blob: 6e1573cd6457bb608dc5d617d29ce74f57d0a94f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>
|