testing/web-platform/tests/html/browsers/the-window-object/window-open-noreferrer.html
author Anne van Kesteren <annevk@annevk.nl>
Wed, 06 Mar 2019 16:53:08 +0000
changeset 464355 5c6bfad36ca045e19786e7eb97104d31a04d81fd
permissions -rw-r--r--
Bug 1527584 [wpt PR 15352] - HTML: window.open("", "", "noreferrer"), a=testonly Automatic update from web-platform-tests HTML: window.open("", "", "noreferrer") For https://github.com/whatwg/html/pull/4331. -- wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb wpt-pr: 15352

<!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>