Skip to content

Commit

Permalink
COEP requires a secure context
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored and sideshowbarker committed Apr 15, 2020
1 parent 0ca5c81 commit 08fb3cc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions html/cross-origin-embedder-policy/no-secure-context.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<meta charset=utf-8>
<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.body.appendChild(document.createElement("iframe"));
t.add_cleanup(() => frame.remove());
frame.src = get_host_info().HTTP_NOTSAMESITE_ORIGIN + new URL("resources/iframe.html", location).pathname;
window.onmessage = t.step_func_done(({ data }) => {
assert_equals(data, "success");
});
frame.onload = t.step_func(() => {
frame.contentWindow.postMessage("parent.postMessage('success', '*');", "*");
});
}, "COEP requires a secure context");
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cross-Origin-Embedder-Policy: require-corp

0 comments on commit 08fb3cc

Please sign in to comment.