mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 04cd5eb8e5c47e4fe341f2fb541d39fa2346f464
This commit is contained in:
parent
0ab2c3f8a3
commit
1d0624b343
226 changed files with 4495 additions and 903 deletions
|
@ -21,4 +21,17 @@ for (const method of methods) {
|
|||
controller.abort();
|
||||
return promise_rejects(t, 'AbortError', promise, `${method} should reject`);
|
||||
}, `${method}() synchronously followed by abort should reject with AbortError`);
|
||||
|
||||
promise_test(async t => {
|
||||
const controller = new AbortController();
|
||||
const signal = controller.signal;
|
||||
return fetch('../incrementer.wasm', { signal })
|
||||
.then(response => {
|
||||
Promise.resolve().then(() => controller.abort());
|
||||
return WebAssembly[method](response);
|
||||
})
|
||||
.catch(err => {
|
||||
assert_true(err.name === "AbortError");
|
||||
});
|
||||
}, `${method}() asynchronously racing with abort should succeed or reject with AbortError`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue