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

Unified Diff: content/test/data/navigation_controller/inject_subframe_into_blank_iframe.html

Issue 2437173002: Fix going back to a script-injected about:blank frame. (Closed)
Patch Set: Fix nits. Created 4 years, 2 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: content/test/data/navigation_controller/inject_subframe_into_blank_iframe.html
diff --git a/content/test/data/navigation_controller/inject_subframe_into_blank_iframe.html b/content/test/data/navigation_controller/inject_subframe_into_blank_iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..022e254cb2906cf18b08b25e1dda394f487750f5
--- /dev/null
+++ b/content/test/data/navigation_controller/inject_subframe_into_blank_iframe.html
@@ -0,0 +1,20 @@
+<html>
+<head></head>
+<body>
+ <p>This page injects an inner frame into an injected blank iframe.
+ <div id="myDiv"></div>
+ <script>
+ var outerIframeHtml = '<iframe src="about:blank" id="outer"><\/iframe>';
+ var innerIframeHtml = '<iframe src="form.html"><\/iframe>';
+
+ // Create an empty about:blank iframe inside the preexisting div.
+ document.getElementById('myDiv').innerHTML = outerIframeHtml;
+
+ // Populate that empty iframe via doc.write, in a way that causes a request.
+ var iDoc = document.getElementById('outer').contentWindow.document;
+ iDoc.open();
+ iDoc.write(innerIframeHtml);
+ iDoc.close();
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698