noreferrer-null-opener.html (706B)
1 <!doctype html> 2 <title>rel=noreferrer nullifies window.opener</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id="log"></div> 6 <script> 7 async_test(function(t) { 8 localStorage.clear() 9 10 var hyperlink = document.body.appendChild(document.createElement("a")) 11 hyperlink.rel = "noreferrer" 12 hyperlink.target = "_blank" 13 hyperlink.href = "resources/window-opener.html" 14 hyperlink.click() 15 document.body.removeChild(hyperlink) 16 17 addEventListener("storage", function(e) { 18 t.step(function() { 19 assert_equals(e.newValue, "null") 20 localStorage.clear() 21 t.done() 22 }) 23 }) 24 }) 25 </script>