mirror of
https://github.com/servo/servo.git
synced 2025-09-05 04:28:22 +01:00
Update web-platform-tests to revision e29e596073468910d8655a8ec23262f17543e147
This commit is contained in:
parent
e56db1f322
commit
5e2118728a
67 changed files with 1403 additions and 821 deletions
23
tests/wpt/web-platform-tests/wasm/webapi/contenttype.any.js
Normal file
23
tests/wpt/web-platform-tests/wasm/webapi/contenttype.any.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
// META: global=window,worker
|
||||
|
||||
const contenttypes = [
|
||||
"",
|
||||
"application/javascript",
|
||||
"application/octet-stream",
|
||||
"text/wasm",
|
||||
"application/wasm;",
|
||||
"application/wasm;x",
|
||||
"application/wasm;charset=UTF-8",
|
||||
];
|
||||
|
||||
for (const contenttype of contenttypes) {
|
||||
promise_test(t => {
|
||||
const response = fetch(`/wasm/incrementer.wasm?pipe=header(Content-Type,${encodeURIComponent(contenttype)})`);
|
||||
return promise_rejects(t, new TypeError(), WebAssembly.compileStreaming(response));
|
||||
}, `Response with Content-Type ${format_value(contenttype)}: compileStreaming`);
|
||||
|
||||
promise_test(t => {
|
||||
const response = fetch(`/wasm/incrementer.wasm?pipe=header(Content-Type,${encodeURIComponent(contenttype)})`);
|
||||
return promise_rejects(t, new TypeError(), WebAssembly.instantiateStreaming(response));
|
||||
}, `Response with Content-Type ${format_value(contenttype)}: instantiateStreaming`);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue