aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js')
-rw-r--r--tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js
index ce643e8a7cb..4c1c1fdabb2 100644
--- a/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js
+++ b/tests/wpt/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js
@@ -2,18 +2,23 @@
test(() => {
assert_throws_dom("DataCloneError", () => {
- new Notification("Bob: Hi", { data: new SharedArrayBuffer() });
+ // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()`
+ const sab = new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer;
+ new Notification("Bob: Hi", { data: sab });
})
}, "SharedArrayBuffer cloning via the Notifications API's data member: basic case");
test(() => {
+ // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()`
+ const sab = new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer;
+
let getter1Called = false;
let getter2Called = false;
assert_throws_dom("DataCloneError", () => {
new Notification("Bob: Hi", { data: [
{ get x() { getter1Called = true; return 5; } },
- new SharedArrayBuffer(),
+ sab,
{ get x() { getter2Called = true; return 5; } }
]});
});