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

Unified Diff: chrome/test/data/magic_iframe/iframe-reparenting-close-window-child.html

Issue 7550021: Add a browsertest for magic iframe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to current tree state Created 9 years, 4 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: chrome/test/data/magic_iframe/iframe-reparenting-close-window-child.html
diff --git a/chrome/test/data/magic_iframe/iframe-reparenting-close-window-child.html b/chrome/test/data/magic_iframe/iframe-reparenting-close-window-child.html
new file mode 100755
index 0000000000000000000000000000000000000000..9936bdfc69d05402021fc853f1baa6ae72e600a9
--- /dev/null
+++ b/chrome/test/data/magic_iframe/iframe-reparenting-close-window-child.html
@@ -0,0 +1,20 @@
+<html>
+<script>
+// Called from Iframe when it is loaded and initialized.
+window.transferIframeAndCloseWindow = function() {
+ var backgroundWin = window.opener;
+ backgroundWin.log("Transferring Iframe now.");
+
+ var xhrFrame = document.getElementById("iframe");
+
+ backgroundWin.document.adoptNode(xhrFrame);
+ backgroundWin.document.body.appendChild(xhrFrame);
+ window.close(); // This is what caused the XHR load to silently abort.
+}
+</script>
+
+<body>
+ child
+ <iframe id="iframe" src="iframe-reparenting-close-window-iframe.html"></iframe>
levin 2011/08/04 22:27:36 80 col.
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698