diff options
Diffstat (limited to 'testing/web-platform/tests/html/cross-origin-embedder-policy/no-secure-context.html')
-rw-r--r-- | testing/web-platform/tests/html/cross-origin-embedder-policy/no-secure-context.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/cross-origin-embedder-policy/no-secure-context.html b/testing/web-platform/tests/html/cross-origin-embedder-policy/no-secure-context.html new file mode 100644 index 0000000000..6e1573cd64 --- /dev/null +++ b/testing/web-platform/tests/html/cross-origin-embedder-policy/no-secure-context.html @@ -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> |