| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../resources/cross-frame-access.js"></script> | |
| 4 <script> | |
| 5 window.onload = function() | |
| 6 { | |
| 7 document.getElementsByTagName('h4')[0].innerHTML = document.domain; | |
| 8 window.addEventListener('message', runTest); | |
| 9 } | |
| 10 | |
| 11 runTest = function() | |
| 12 { | |
| 13 if (!window.testRunner) | |
| 14 return; | |
| 15 | |
| 16 plg.getURL("navigation-happened.html", "toNavigate"); | |
| 17 | |
| 18 start = new Date(); | |
| 19 myInterval = setInterval(checkIfDone, 500); | |
| 20 } | |
| 21 | |
| 22 checkIfDone = function() | |
| 23 { | |
| 24 var numOpenWindows = testRunner.windowCount(); | |
| 25 var now = new Date(); | |
| 26 if (numOpenWindows == 2) { | |
| 27 log("Test PASSED"); | |
| 28 clearInterval(myInterval); | |
| 29 testRunner.notifyDone(); | |
| 30 } else if (now - start > 10000) { | |
| 31 log('TEST FAILED: Window count ' + numOpenWindows); | |
| 32 clearInterval(myInterval); | |
| 33 testRunner.notifyDone(); | |
| 34 } | |
| 35 } | |
| 36 </script> | |
| 37 </head> | |
| 38 <body> | |
| 39 <embed name="plg" type="application/x-webkit-test-netscape"></embed> | |
| 40 <h3>Frame-with-plugin-to-navigate</h3> | |
| 41 <h4>DOMAIN</h4> | |
| 42 <pre id='console'></pre> | |
| 43 </body> | |
| 44 </html> | |
| OLD | NEW |