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

Unified Diff: content/test/data/browser_plugin_naming_guest.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/test/data/browser_plugin_naming_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_naming_guest.html
diff --git a/content/test/data/browser_plugin_naming_guest.html b/content/test/data/browser_plugin_naming_guest.html
new file mode 100644
index 0000000000000000000000000000000000000000..5b2b8a3bc1ecb2c7cb06e7fcf63444a95606ff66
--- /dev/null
+++ b/content/test/data/browser_plugin_naming_guest.html
@@ -0,0 +1,29 @@
+<html>
+ <body>
+ <script>
+ var embedder = null;
+ var lastName = '';
+ function SetWindowName(name) {
+ window.name = name;
+ lastName = name;
+ embedder.postMessage(name, '*');
+ }
+
+ function pollName() {
+ if (window.name != lastName) {
+ lastName = window.name;
+ // Signal the embedder with the new window name.
+ embedder.postMessage(lastName, '*');
+ setTimeout(pollName, 100);
+ }
+ }
+
+ window.addEventListener('message', function(e) {
+ console.log('test');
+ embedder = e.source;
+ SetWindowName('guest');
+ setTimeout(pollName, 100);
+ });
+ </script>
+ </body>
+</html>
« no previous file with comments | « content/test/data/browser_plugin_naming_embedder.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698