blob: a5cab1be219753b46f88c25cbfce241682f29d29 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
</head>
<body>
<a id="testLink" target="foo" rel="noopener" href="/navigation/resources/otherpage.html"></a>
<script>
description("Make sure that windows opened with 'noopener' via an anchor are not targetable. If testing manually, you should see 2 tabs open.");
jsTestIsAsync = true;
onload = function() {
testLink.click();
setTimeout(function() {
w = open("/navigation/resources/otherpage.html", "foo"); // Should create a new window.
shouldBeEqualToString("w.location.href", "about:blank");
w.onload = function() {
if (window.testRunner) {
// Same-site noopener popups now share a process, so all 3 windows are counted.
shouldBe("testRunner.windowCount()", "3");
}
finishJSTest();
}
}, 100);
}
</script>
</body>
</html>