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

Side by Side Diff: content/test/data/post_message.html

Issue 1312643002: Plumb opener information when creating RenderFrames and RenderFrameProxies for subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opener-CreateOpenerProxiesIfNeeded
Patch Set: Fix param ordering in RenderThreadImpl::OnCreateNewFrameProxy Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 2
3 <head><title>Post message tests</title> 3 <head><title>Post message tests</title>
4 <script> 4 <script>
5 // Send a message to our opener, and it will reply. 5 // Send a message to our opener, and it will reply.
6 function postToOpener(msg, origin) { 6 function postToOpener(msg, origin) {
7 window.opener.postMessage(msg, origin); 7 window.opener.postMessage(msg, origin);
8 return true; 8 return true;
9 } 9 }
10 10
11 // Send a message to our opener's opener. 11 // Send a message to our opener's opener.
12 function postToOpenerOfOpener(msg, origin) { 12 function postToOpenerOfOpener(msg, origin) {
13 window.opener.opener.postMessage(msg, origin); 13 window.opener.opener.postMessage(msg, origin);
14 return true; 14 return true;
15 } 15 }
16 16
17 // Send a message to our parent's opener. 17 // Send a message to our parent's opener.
18 function postToOpenerOfParent(msg, origin) { 18 function postToOpenerOfParent(msg, origin) {
19 parent.opener.postMessage(msg, origin); 19 parent.opener.postMessage(msg, origin);
20 return true; 20 return true;
21 } 21 }
22 22
23 // Send a message to our parent's opener.
24 function postToOpenerOfSibling(siblingName, msg, origin) {
25 parent.frames[siblingName].opener.postMessage(msg, origin);
26 return true;
27 }
28
23 // Send a message to a window named "foo". 29 // Send a message to a window named "foo".
24 function postToFoo(msg) { 30 function postToFoo(msg) {
25 var w = window.open("", "foo"); 31 var w = window.open("", "foo");
26 w.postMessage(msg, "*"); 32 w.postMessage(msg, "*");
27 return true; 33 return true;
28 } 34 }
29 35
30 function openPopup(url) { 36 function openPopup(url) {
31 popup = window.open(url); 37 popup = window.open(url);
32 } 38 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Change the title to generate a notification. 89 // Change the title to generate a notification.
84 document.title = event.data.message; 90 document.title = event.data.message;
85 } else { 91 } else {
86 document.title = event.data; 92 document.title = event.data;
87 } 93 }
88 } 94 }
89 </script> 95 </script>
90 </head> 96 </head>
91 97
92 </html> 98 </html>
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698