Files
tubestation/testing/web-platform/tests/encoding/idlharness.html
Luke Bjerring 5511ed24ec Bug 1452643 [wpt PR 9780] - Update the encoding IDL file, a=testonly
Automatic update from web-platform-testsUpdate the encoding IDL file (#9780)

Also update the existing idlharness.js test to use it.

wpt-commits: b202bbb5aa0d235b22bac11fe902eab1094ef9d2
wpt-pr: 9780
wpt-commits: b202bbb5aa0d235b22bac11fe902eab1094ef9d2
wpt-pr: 9780
2018-04-15 08:30:59 +01:00

26 lines
881 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>idlharness test: Encoding Living Standard API</title>
<link rel="author" title="Joshua Bell" href="mailto:jsbell@google.com" />
<link rel="help" href="https://encoding.spec.whatwg.org/#api"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<h1>idlharness test</h1>
<p>This test validates the WebIDL included in the Encoding Living Standard.</p>
<script>
promise_test(async() => {
const text = await (await fetch('/interfaces/encoding.idl')).text();
const idl_array = new IdlArray();
idl_array.add_idls(text);
idl_array.add_objects({
TextEncoder: ['new TextEncoder()'],
TextDecoder: ['new TextDecoder()']
});
idl_array.test();
}, 'Test driver');
</script>