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

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: now moved method outside of the class 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..7684b0a823928ec705155c60df96e524e8705123
--- /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>
+ <iframe id="iframe" src="iframe-reparenting-close-window-iframe.html">
+ </iframe>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698