mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 21:58:41 +02:00
Automatic update from web-platform-testsAdd some tests for invalid arguments to WebAssembly.*Streaming. -- Test some invalid HTTP statuses. -- Test cross-origin responses for WebAssembly. -- Add tests for case differences in the wasm content type. -- Add a test for empty bodies. -- Add a test for disturbed bodies. -- Add a test for passing a rejected Promise. -- Add some tests for instantiateStreaming(). -- wpt-commits: 99e7a8e331555e0637a2cee1bda193093df36d5b, 700452f6412a17cbf5586dfa24047a164661f89c, 939a2b9916c01fe18c5f240c09e27be1ff99f0b7, f0e55e90830a2fdea4e99e5fc019c959c3f7c982, 06c65c738bba5e0587d1bde349b4601dd8b932ac, b47da4fd4f519b1fe8bd77582ed57d2c5129e62d, 2832c5d39c644281ac644428c8d09c2443602eae, 36ed1aa52242875634e4b33a50e3fded2787656d wpt-pr: 13652
15 lines
708 B
JavaScript
15 lines
708 B
JavaScript
// META: global=window,worker
|
|
|
|
for (const method of ["compileStreaming", "instantiateStreaming"]) {
|
|
promise_test(t => {
|
|
const url = "http://{{domains[www]}}:{{ports[http][0]}}/wasm/incrementer.wasm";
|
|
const response = fetch(url, { "mode": "no-cors" });
|
|
return promise_rejects(t, new TypeError(), WebAssembly[method](response));
|
|
}, `Opaque response: ${method}`);
|
|
|
|
promise_test(t => {
|
|
const url = "/fetch/api/resources/redirect.py?redirect_status=301&location=/wasm/incrementer.wasm";
|
|
const response = fetch(url, { "mode": "no-cors", "redirect": "manual" });
|
|
return promise_rejects(t, new TypeError(), WebAssembly[method](response));
|
|
}, `Opaque redirect response: ${method}`);
|
|
}
|