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

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

Issue 1309043003: Handle frame openers in the same FrameTree when navigating subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opener-cycle-detection
Patch Set: Add comment for the DCHECK 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/browser/web_contents/web_contents_impl_unittest.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.
18 function postToOpenerOfParent(msg, origin) {
19 parent.opener.postMessage(msg, origin);
20 return true;
21 }
22
17 // Send a message to a window named "foo". 23 // Send a message to a window named "foo".
18 function postToFoo(msg) { 24 function postToFoo(msg) {
19 var w = window.open("", "foo"); 25 var w = window.open("", "foo");
20 w.postMessage(msg, "*"); 26 w.postMessage(msg, "*");
21 return true; 27 return true;
22 } 28 }
23 29
24 function openPopup(url) { 30 function openPopup(url) {
25 popup = window.open(url); 31 popup = window.open(url);
26 } 32 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Change the title to generate a notification. 83 // Change the title to generate a notification.
78 document.title = event.data.message; 84 document.title = event.data.message;
79 } else { 85 } else {
80 document.title = event.data; 86 document.title = event.data;
81 } 87 }
82 } 88 }
83 </script> 89 </script>
84 </head> 90 </head>
85 91
86 </html> 92 </html>
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698