Skip to content

Commit

Permalink
Bug 1571693 [wpt PR 17802] - HTML: ensure serializing SharedArrayBuff…
Browse files Browse the repository at this point in the history
…er throws without COOP+COEP, a=testonly

Automatic update from web-platform-tests
HTML: ensure serializing SharedArrayBuffer throws without COOP+COEP

For whatwg/html#4734.
--

wpt-commits: aecedb53e28abad5432227e293dd016cfc46d4b7
wpt-pr: 17802
  • Loading branch information
annevk authored and moz-wptsync-bot committed Aug 9, 2019
1 parent 1095b30 commit 7f2eefd
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
test(() => {
const sab = new SharedArrayBuffer();
const channel = new MessageChannel();
assert_throws("DataCloneError", () => channel.port1.postMessage(sab));
}, "SharedArrayBuffer over MessageChannel without COOP+COEP");

test(() => {
const sab = new SharedArrayBuffer();
const channel = new BroadcastChannel("Is mir egal");
assert_throws("DataCloneError", () => channel.postMessage(sab));
}, "SharedArrayBuffer over BroadcastChannel without COOP+COEP");

if (self.GLOBAL.isWindow()) {
test(() => {
const sab = new SharedArrayBuffer();
assert_throws("DataCloneError", () => self.postMessage(sab));
}, "SharedArrayBuffer over postMessage() without COOP+COEP");
}

0 comments on commit 7f2eefd

Please sign in to comment.