Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8

This commit is contained in:
WPT Sync Bot 2018-10-25 21:32:39 -04:00
parent abc0f50d20
commit e07315e6af
221 changed files with 7334 additions and 774 deletions

View file

@ -0,0 +1,20 @@
// META: global=window,worker
const invalidArguments = [
[() => new Response(undefined, { headers: { "Content-Type": "application/wasm" } }), "no body"],
[() => new Response("", { headers: { "Content-Type": "application/wasm" } }), "empty body"],
];
for (const method of ["compileStreaming", "instantiateStreaming"]) {
for (const [argumentFactory, name] of invalidArguments) {
promise_test(t => {
const argument = argumentFactory();
return promise_rejects(t, new WebAssembly.CompileError(), WebAssembly[method](argument));
}, `${method}: ${name}`);
promise_test(t => {
const argument = Promise.resolve(argumentFactory());
return promise_rejects(t, new WebAssembly.CompileError(), WebAssembly[method](argument));
}, `${method}: ${name} in a promise`);
}
}