mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 0f0b7a7e353421b600ee555bf354d3a98bb603ae
This commit is contained in:
parent
363073568e
commit
71dcf37d55
175 changed files with 2749 additions and 678 deletions
|
@ -0,0 +1,28 @@
|
|||
"use strict";
|
||||
|
||||
function createEmptyWasmModule() {
|
||||
return new WebAssembly.Module(
|
||||
new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00]));
|
||||
}
|
||||
|
||||
test(() => {
|
||||
assert_throws("DataCloneError", () => {
|
||||
new Notification("Bob: Hi", { data: createEmptyWasmModule() });
|
||||
})
|
||||
}, "WebAssembly.Module cloning via the Notifications API's data member: basic case");
|
||||
|
||||
test(() => {
|
||||
let getter1Called = false;
|
||||
let getter2Called = false;
|
||||
|
||||
assert_throws("DataCloneError", () => {
|
||||
new Notification("Bob: Hi", { data: [
|
||||
{ get x() { getter1Called = true; return 5; } },
|
||||
createEmptyWasmModule(),
|
||||
{ get x() { getter2Called = true; return 5; } }
|
||||
]});
|
||||
});
|
||||
|
||||
assert_true(getter1Called, "The getter before the SAB must have been called");
|
||||
assert_false(getter2Called, "The getter after the SAB must not have been called");
|
||||
}, "WebAssembly.Module cloning via the Notifications API's data member: is interleaved correctly");
|
Loading…
Add table
Add a link
Reference in a new issue