mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2
This commit is contained in:
parent
db7bb2a510
commit
f2c1b70e4a
138 changed files with 2799 additions and 851 deletions
|
@ -18,3 +18,33 @@ for (const [name, fn] of instanceTestFactory) {
|
|||
verify(result.instance);
|
||||
}, name);
|
||||
}
|
||||
|
||||
promise_test(async () => {
|
||||
const builder = new WasmModuleBuilder();
|
||||
builder.addImportedGlobal("module", "global", kWasmI32);
|
||||
const buffer = builder.toBuffer();
|
||||
const response = new Response(buffer, { "headers": { "Content-Type": "application/wasm" } });
|
||||
const order = [];
|
||||
|
||||
const imports = {
|
||||
get module() {
|
||||
order.push("module getter");
|
||||
return {
|
||||
get global() {
|
||||
order.push("global getter");
|
||||
return 0;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
const expected = [
|
||||
"module getter",
|
||||
"global getter",
|
||||
];
|
||||
const p = WebAssembly.instantiateStreaming(response, imports);
|
||||
assert_array_equals(order, []);
|
||||
const result = await p;
|
||||
assert_WebAssemblyInstantiatedSource(result, {});
|
||||
assert_array_equals(order, expected);
|
||||
}, "Synchronous options handling");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue