11cb0ef41Sopenharmony_ci// META: global=window,worker 21cb0ef41Sopenharmony_ci// META: script=/wasm/jsapi/wasm-module-builder.js 31cb0ef41Sopenharmony_ci// META: script=/wasm/jsapi/bad-imports.js 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_citest_bad_imports((name, error, build, ...args) => { 61cb0ef41Sopenharmony_ci promise_test(t => { 71cb0ef41Sopenharmony_ci const builder = new WasmModuleBuilder(); 81cb0ef41Sopenharmony_ci build(builder); 91cb0ef41Sopenharmony_ci const buffer = builder.toBuffer(); 101cb0ef41Sopenharmony_ci const response = new Response(buffer, { "headers": { "Content-Type": "application/wasm" } }); 111cb0ef41Sopenharmony_ci return promise_rejects_js(t, error, WebAssembly.instantiateStreaming(response, ...args)); 121cb0ef41Sopenharmony_ci }, name); 131cb0ef41Sopenharmony_ci}); 14