xref: /third_party/node/test/fixtures/wpt/wasm/webapi/status.any.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/wpt/wasm/webapi/
11cb0ef41Sopenharmony_ci// META: global=window,worker
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciconst statuses = [
41cb0ef41Sopenharmony_ci  0,
51cb0ef41Sopenharmony_ci  300,
61cb0ef41Sopenharmony_ci  400,
71cb0ef41Sopenharmony_ci  404,
81cb0ef41Sopenharmony_ci  500,
91cb0ef41Sopenharmony_ci  600,
101cb0ef41Sopenharmony_ci  700,
111cb0ef41Sopenharmony_ci  999,
121cb0ef41Sopenharmony_ci];
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_cifor (const method of ["compileStreaming", "instantiateStreaming"]) {
151cb0ef41Sopenharmony_ci  for (const status of statuses) {
161cb0ef41Sopenharmony_ci    promise_test(t => {
171cb0ef41Sopenharmony_ci      const response = fetch(`status.py?status=${status}`);
181cb0ef41Sopenharmony_ci      return promise_rejects_js(t, TypeError, WebAssembly[method](response));
191cb0ef41Sopenharmony_ci    }, `Response with status ${status}: ${method}`);
201cb0ef41Sopenharmony_ci  }
211cb0ef41Sopenharmony_ci}
22

Indexes created Thu Nov 07 10:32:03 CST 2024