%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/test/fixtures/wpt/wasm/webapi/
Upload File :
Create Path :
Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/test/fixtures/wpt/wasm/webapi/body.any.js

// META: global=window,worker
// META: script=/wasm/jsapi/wasm-module-builder.js

for (const method of ["compileStreaming", "instantiateStreaming"]) {
  promise_test(t => {
    const buffer = new WasmModuleBuilder().toBuffer();
    const argument = new Response(buffer, { headers: { "Content-Type": "application/wasm" } });
    argument.arrayBuffer();
    return promise_rejects_js(t, TypeError, WebAssembly[method](argument));
  }, `${method} after consumption`);

  promise_test(t => {
    const buffer = new WasmModuleBuilder().toBuffer();
    const argument = new Response(buffer, { headers: { "Content-Type": "application/wasm" } });
    const promise = WebAssembly[method](argument);
    argument.arrayBuffer();
    return promise_rejects_js(t, TypeError, promise);
  }, `${method} before consumption`);
}

Zerion Mini Shell 1.0