Sync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / html / browsers / windows / noreferrer-null-opener.html
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>