window-open-noreferrer.html (683B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>window.open() with "noreferrer" tests</title> 4 <script src=/resources/testharness.js></script> 5 <script src=/resources/testharnessreport.js></script> 6 <script> 7 async_test(t => { 8 const channelName = "343243423432", 9 channel = new BroadcastChannel(channelName); 10 window.open("support/noreferrer-target.html?" + channelName, "", "noreferrer"); 11 channel.onmessage = t.step_func_done(e => { 12 // Send message first so if asserts throw the popup is still closed 13 channel.postMessage(null); 14 15 assert_equals(e.data.name, ""); 16 assert_equals(e.data.referrer, ""); 17 assert_equals(e.data.haveOpener, false); 18 }); 19 }); 20 </script>