diff options
Diffstat (limited to '')
-rw-r--r-- | testing/web-platform/tests/webmessaging/broadcastchannel/resources/cross-origin.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webmessaging/broadcastchannel/resources/cross-origin.html b/testing/web-platform/tests/webmessaging/broadcastchannel/resources/cross-origin.html new file mode 100644 index 0000000000..5078b6fc8e --- /dev/null +++ b/testing/web-platform/tests/webmessaging/broadcastchannel/resources/cross-origin.html @@ -0,0 +1,15 @@ +<body></body> +<script> + window.onload = function() { + bc1 = new BroadcastChannel('no-cross-origin-messages'); + bc2 = new BroadcastChannel('no-cross-origin-messages'); + bc2.onmessage = e => { + parent.postMessage('done', "*"); + }; + // Post a message on bc1 and once we receive it in bc2, we know that the + // message should have been sent to bc0 if messages were being passed + // across origin (assuming compliance with the spec regarding message + // delivery in port creation order). + bc1.postMessage('ignition'); + } +</script> |