blob: 38ecc40252e51d4a4daf9f1a58d31b0ec79c4ea3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// META: global=window,worker
// META: script=/wasm/jsapi/wasm-module-builder.js
// META: script=/wasm/jsapi/bad-imports.js
test_bad_imports((name, error, build, ...args) => {
promise_test(t => {
const builder = new WasmModuleBuilder();
build(builder);
const buffer = builder.toBuffer();
const response = new Response(buffer, { "headers": { "Content-Type": "application/wasm" } });
return promise_rejects_js(t, error, WebAssembly.instantiateStreaming(response, ...args));
}, name);
});
|