Index: LayoutTests/fast/dom/Window/open-after-frame-detached.html |
diff --git a/LayoutTests/fast/dom/Window/open-after-frame-detached.html b/LayoutTests/fast/dom/Window/open-after-frame-detached.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff2806499a5214f914f91191d287b33bc77712b9 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Window/open-after-frame-detached.html |
@@ -0,0 +1,24 @@ |
+<html> |
+<head> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+var childWindow; |
+function runTest() |
+{ |
+ description("Tests that calling window.open on the contentWindow of a detached frame does not crash or open a new window. You may need to disable popup blocking for this test case."); |
+ if (window.testRunner) |
+ testRunner.setCanOpenWindows(); |
+ var ifr = document.createElement("iframe"); |
+ ifr.onload = function () |
+ { |
+ childWindow = ifr.contentWindow; |
+ ifr.parentNode.removeChild(ifr); |
+ shouldBeNull("childWindow.open('about:blank')"); |
+ } |
+ document.body.appendChild(ifr); |
+} |
+</script> |
+</head> |
+<body onload="runTest()"> |
+</body> |
+</html> |