| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 if (window.testRunner) { | 2 if (window.testRunner) { |
| 3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
| 4 testRunner.waitUntilDone(); | 4 testRunner.waitUntilDone(); |
| 5 } | 5 } |
| 6 | 6 |
| 7 window.onmessage = function(e) { | 7 window.onmessage = function(e) { |
| 8 document.documentElement.appendChild(document.createTextNode(e.data)); | 8 document.documentElement.appendChild(document.createTextNode(e.data)); |
| 9 if (window.testRunner) | 9 if (window.testRunner) |
| 10 testRunner.notifyDone(); | 10 testRunner.notifyDone(); |
| 11 } | 11 } |
| 12 | 12 |
| 13 var i = document.documentElement.appendChild(document.createElement('iframe')); | 13 var i = document.documentElement.appendChild(document.createElement('iframe')); |
| 14 var f = frames[0].Function; | 14 var f = frames[0].Function; |
| 15 i.onload = function() { | 15 i.onload = function() { |
| 16 f("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')"
)(); | 16 f("location.replace('javascript:window.top.postMessage(\\'FAIL\\', \\'*\\')')"
)(); |
| 17 setTimeout(function() { | 17 setTimeout(function() { |
| 18 window.postMessage("PASS", "*"); | 18 window.postMessage("PASS", "*"); |
| 19 }, 0); | 19 }, 0); |
| 20 } | 20 } |
| 21 i.src = 'https://localhost:8443/security/resources/innocent-victim.html'; | 21 i.src = 'https://localhost:8443/security/resources/innocent-victim.html'; |
| 22 </script> | 22 </script> |
| OLD | NEW |