blob: 37ec9e15600f6aca655aba48f100884450fb3fc1 [file] [log] [blame]
<DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test.js"></script>
<script>
description("Tests that setting window.opener to null disown its opener");
jsTestIsAsync = true;
onload = function() {
if (window.testRunner)
testRunner.setCanOpenWindows();
newWindow = open("resources/blank.html");
newWindow.onload = function() {
shouldBe("newWindow.opener", "window");
openerGetter = Object.getOwnPropertyDescriptor(newWindow, "opener").get;
shouldNotThrow("newWindow.opener = null");
shouldBeNull("newWindow.opener");
shouldBeNull("openerGetter.call(newWindow)");
finishJSTest();
};
};
</script>
</body>
</html>