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

Unified Diff: content/test/data/browser_plugin_naming_embedder.html

Issue 11554030: <webview>: Add name attribute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 7 years, 11 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/test/data/browser_plugin_naming_guest.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/browser_plugin_naming_embedder.html
diff --git a/content/test/data/browser_plugin_naming_embedder.html b/content/test/data/browser_plugin_naming_embedder.html
new file mode 100644
index 0000000000000000000000000000000000000000..7d6e1a6a10cd2af9b7866ea14fdb7eb4359d2be4
--- /dev/null
+++ b/content/test/data/browser_plugin_naming_embedder.html
@@ -0,0 +1,37 @@
+<html>
+ <body>
+ <object id="plugin"
+ type="application/browser-plugin"
+ width="640"
+ height="480"></object>
+ <script>
+ var loadstop = false;
+ var requestCommChannel = false;
+ function SetSrc(src) {
+ var plugin = document.getElementById('plugin');
+ plugin.src = src;
+ }
+ // Open a two-way communication channel with the guest.
+ function OpenCommChannel() {
+ if (!loadstop) {
+ requestCommChannel = true;
+ return;
+ }
+ var plugin = document.getElementById('plugin');
+ plugin.contentWindow.frames.postMessage('test', '*');
+ }
+
+ // Establish a two-way channel with the guest.
+ window.addEventListener('message', function(e) {
+ document.title = event.data;
+ });
+ var plugin = document.getElementById('plugin');
+ plugin.addEventListener('-internal-loadstop', function(e) {
+ loadstop = true;
+ if (requestCommChannel) {
+ plugin.contentWindow.frames.postMessage('test', '*');
+ }
+ });
+ </script>
+ </body>
+</html>
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/test/data/browser_plugin_naming_guest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698