blob: 0b004c7301cd60d36dc5b7a6daddd64fdf3d7234 [file] [log] [blame]
<!DOCTYPE html>
<html>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description("Test that a Window can be focused / closed by its opener");
window.jsTestIsAsync = true;
debug("* Opening new window");
newWindow = window.open('about:blank', '_blank');
newWindow.onfocus = function() {
testPassed("New Window focused");
newWindow.close();
setTimeout(function() {
shouldBeTrue("newWindow.closed");
finishJSTest();
}, 0);
}
shouldBe("newWindow.opener", "window");
evalAndLog("newWindow.focus()");
</script>
<script src="../../../resources/js-test-post.js"></script>
</html>