| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="resources/recv.js"></script> | 4 <script src="resources/recv.js"></script> |
| 5 <script> | 5 <script> |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 // We have different console output in --site-per-process mode. See https://
crbug.com/614413. |
| 9 testRunner.setDumpConsoleMessages(false); |
| 8 testRunner.waitUntilDone(); | 10 testRunner.waitUntilDone(); |
| 9 } | 11 } |
| 10 | 12 |
| 11 addEventListener("message", recv, false); | 13 addEventListener("message", recv, false); |
| 12 | 14 |
| 13 function tryPostMessage(origin) { | 15 function tryPostMessage(origin) { |
| 14 try { | 16 try { |
| 15 win.postMessage("Trying origin=" + origin, origin); | 17 win.postMessage("Trying origin=" + origin, origin); |
| 16 document.getElementById("result").innerHTML += "<br>Posted message to '" + o
rigin + "' without any exceptions."; | 18 document.getElementById("result").innerHTML += "<br>Posted message to '" + o
rigin + "' without any exceptions."; |
| 17 } catch(ex) { | 19 } catch(ex) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 37 } | 39 } |
| 38 </script> | 40 </script> |
| 39 <body> | 41 <body> |
| 40 <div>window.location.href = <script>document.write(window.location.href);</scrip
t></div> | 42 <div>window.location.href = <script>document.write(window.location.href);</scrip
t></div> |
| 41 <div id="result">waiting...</div> | 43 <div id="result">waiting...</div> |
| 42 <div><iframe src="http://localhost:8000/security/postMessage/resources/post-mess
age-listener.html" onload="test()" | 44 <div><iframe src="http://localhost:8000/security/postMessage/resources/post-mess
age-listener.html" onload="test()" |
| 43 id="child" width="800" height="300" style="border: 1px solid black;"> | 45 id="child" width="800" height="300" style="border: 1px solid black;"> |
| 44 </iframe></div> | 46 </iframe></div> |
| 45 </body> | 47 </body> |
| 46 </html> | 48 </html> |
| OLD | NEW |