Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / test / data / frame_tree / page_with_post_message_frames.html
blob30d7346ccd7de18b125bf596e6a1d11c7403edd8
1 <!DOCTYPE html>
2 <head><title>postMessage tests</title>
3 <script>
4 window.addEventListener("message", messageReceived, false);
6 var receivedMessages = 0;
7 function messageReceived(event) {
8 receivedMessages++;
9 document.title = event.data;
10 event.source.postMessage(event.data + "-reply", "*");
13 </script>
14 </head>
15 <body>
16 This page has two iframes that send postMessages: one is same-site, one is
17 cross-site.
18 <iframe name="subframe1" src="/post_message.html"></iframe>
19 <iframe name="subframe2" src="/cross-site/foo.com/post_message.html"></iframe>
20 </body>
21 </html>