mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 74d709131e3c91d09f1708378648a01957c47b38
This commit is contained in:
parent
e4657c1496
commit
81f079c722
77 changed files with 2043 additions and 524 deletions
40
tests/wpt/web-platform-tests/wasm/jsapi/idlharness.any.js
Normal file
40
tests/wpt/web-platform-tests/wasm/jsapi/idlharness.any.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: script=../resources/load_wasm.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// https://webassembly.github.io/spec/js-api/
|
||||
|
||||
promise_test(async () => {
|
||||
const srcs = ['wasm-js-api'];
|
||||
const [wasm] = await Promise.all(
|
||||
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
|
||||
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_idls(wasm, {
|
||||
// Note the prose requirements in the specification.
|
||||
except: ['CompileError', 'LinkError', 'RuntimeError']
|
||||
});
|
||||
|
||||
// https://github.com/web-platform-tests/wpt/issues/12850
|
||||
idl_array.add_untested_idls('[Exposed=(Window,Worker)] interface ArrayBuffer {};');
|
||||
|
||||
// Ignored errors are surfaced in idlharness.js's test_object below.
|
||||
try {
|
||||
self.memory = new WebAssembly.Memory({initial: 1024});
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
self.mod = await createWasmModule();
|
||||
self.instance = new WebAssembly.Instance(self.mod);
|
||||
} catch (e) { }
|
||||
|
||||
idl_array.add_objects({
|
||||
Memory: ['memory'],
|
||||
Module: ['mod'],
|
||||
Instance: ['instance'],
|
||||
});
|
||||
idl_array.test();
|
||||
}, 'wasm-js-api interfaces.');
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue