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

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

Issue 10829225: Browser Plugin: Add HTML5-like postMessage support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 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
« no previous file with comments | « content/test/data/browser_plugin_embedder.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/browser_plugin_post_message_guest.html
diff --git a/content/test/data/browser_plugin_post_message_guest.html b/content/test/data/browser_plugin_post_message_guest.html
new file mode 100644
index 0000000000000000000000000000000000000000..57c1c3c452c800535a6c6bfafc063bd1002e3fd3
--- /dev/null
+++ b/content/test/data/browser_plugin_post_message_guest.html
@@ -0,0 +1,23 @@
+<script>
+ var embedder;
+ function receiveMessage(event) {
+ embedder = event.source;
+ if (event.data !== 'stop') {
+ event.source.postMessage('foobar', '*');
+ } else {
+ if (event.data !== '') {
+ event.source.postMessage('stop_ack ' + window.name, '*');
+ }
+ }
+ }
+ window.addEventListener('message', receiveMessage, false);
+ function CreateChildFrame(src) {
+ var ifrm = document.createElement("IFRAME");
+ ifrm.style.width = "640px";
+ ifrm.style.height = "480px";
+ ifrm.src = src;
+ ifrm.name = 'iframe';
+ document.body.appendChild(ifrm);
+ embedder.postMessage('ready', '*');
+ }
+</script>
« no previous file with comments | « content/test/data/browser_plugin_embedder.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698