diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_blank-002.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_blank-002.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_blank-002.html b/testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_blank-002.html new file mode 100644 index 0000000000..aba9d52ba0 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_blank-002.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>Link with target=_blank, rel=noreferrer</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/PrefixedLocalStorage.js"></script> +<div id="log"></div> +<a href="resources/report-has-opener.html" rel="noreferrer" target="_blank">Link</a> +<script> +var prefixedStorage; +setup (() => prefixedStorage = new PrefixedLocalStorageTest()); + +async_test(t => { + t.add_cleanup(() => prefixedStorage.cleanup()); + var a = document.getElementsByTagName('a')[0]; + a.href = prefixedStorage.url(a.href); + prefixedStorage.onSet('hasOpener', t.step_func_done(e => { + assert_equals(e.newValue, 'false'); + })); + a.click(); +}, 'Context for opened noreferrer link targeted to "_blank" should not have opener reference'); +</script> |