Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: LayoutTests/fast/dom/Window/open-after-frame-detached.html

Issue 131113003: Fix DOMWindow::isCurrentlyDisplayedInFrame to return false when detached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ScreenOrientation + test window.open. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698