Skip to content

Commit

Permalink
HTML: cross-site SharedArrayBuffer ought to not work
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Aug 26, 2019
1 parent 23ff481 commit 79aac25
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
parent.postMessage(new SharedArrayBuffer(10), "*");
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: cross-site
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<div id=log></div>
<script>
async_test(t => {
const frame = document.createElement("iframe");
t.add_cleanup(() => frame.remove());
frame.src = get_host_info().HTTPS_NOTSAMESITE_ORIGIN + new URL("resources/iframe-failure.html", location).pathname;
window.onmessage = t.unreached_func("Got a message event, expected a messageerror event");
window.onmessageerror = t.step_func_done();
document.body.append(frame);
}, "SharedArrayBuffer and a cross-site <iframe>");
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

0 comments on commit 79aac25

Please sign in to comment.