blob: f4de7aa444cdd697450f274d9cceecbee3ecee7a [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() {
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>