diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html new file mode 100644 index 0000000000..92b72cdb5f --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html @@ -0,0 +1,20 @@ +<!doctype html> +<meta charset=utf-8> +<title>window.open() with "noreferrer" tests</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script> +async_test(t => { + const channelName = "343243423432", + channel = new BroadcastChannel(channelName); + window.open("support/noreferrer-target.html?" + channelName, "", "noreferrer"); + channel.onmessage = t.step_func_done(e => { + // Send message first so if asserts throw the popup is still closed + channel.postMessage(null); + + assert_equals(e.data.name, ""); + assert_equals(e.data.referrer, ""); + assert_equals(e.data.haveOpener, false); + }); +}); +</script> |