Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that disables it given conditions:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/windows/browsing-context-names/choose-_blank-003.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Link with target=_blank, no rel</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" target="_blank">Link</a>
<script>
var prefixedStorage;
setup(() => prefixedStorage = new PrefixedLocalStorageTest());
async_test(t => {
t.add_cleanup(() => prefixedStorage.cleanup());
prefixedStorage.onSet('hasOpener', t.step_func_done(e => {
assert_equals(e.newValue, 'false');
}));
var a = document.getElementsByTagName('a')[0];
a.href = prefixedStorage.url(a.href);
a.click();
}, 'Context created by link targeting "_blank" should not have opener reference');
</script>