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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/parent_frame.html

Issue 1262563003: Subframes in inner WebContents should not create proxies in process of outer WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from lfg@ Created 5 years, 5 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/extensions/platform_apps/web_view/shim/parent_frame.html
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/parent_frame.html b/chrome/test/data/extensions/platform_apps/web_view/shim/parent_frame.html
new file mode 100644
index 0000000000000000000000000000000000000000..e32310431566cc93b62f786b1ec76ca801f6929d
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/parent_frame.html
@@ -0,0 +1,35 @@
+<!--
+ * Copyright (c) 2015 The Chromium Authors. All rights reserved. Use of this
+ * source code is governed by a BSD-style license that can be found in the
+ * LICENSE file.
+-->
+<body>
+ <iframe></iframe>
+ <script>
+ var frame = document.querySelector('iframe');
+ var port = null;
+ var seenRequest = false;
+
+ // Message arrives from <webview>.
+ window.onmessage = function(e) {
+ seenRequest = true;
+ port = e.source;
+ if (e.data == 'load-frames') {
+ // Start loading the iframe.
+ frame.src = 'child_frame.html';
+ }
+ };
+
+ frame.onload = function() {
+ if (seenRequest) {
+ var childFrame =
+ frame.contentWindow.document.getElementById('child-frame');
+ childFrame.onload = function() {
+ port.postMessage('frames-loaded', '*');
+ };
+ // Load the nested iframe.
+ childFrame.src = 'data:text/html,Hello';
+ }
+ };
+ </script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698