OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function loaded() | 4 function loaded() |
5 { | 5 { |
6 document.getElementsByTagName('h4')[0].innerHTML = document.domain; | 6 document.getElementsByTagName('h4')[0].innerHTML = document.domain; |
7 // Allow the user to click the button during manuel runs. | 7 } |
8 if (window.testRunner) | 8 |
9 performTest(); | 9 function startTest(event) |
| 10 { |
| 11 // A manual click should navigate. |
| 12 if (window.eventSender) { |
| 13 var button = document.getElementById("b"); |
| 14 eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 2, bu
tton.offsetTop + event.data.y + 2); |
| 15 eventSender.mouseDown(); |
| 16 eventSender.mouseUp(); |
| 17 } |
10 } | 18 } |
11 | 19 |
12 function performTest() | 20 function performTest() |
13 { | 21 { |
14 parent.location = "http://localhost:8000/security/frameNavigation/re
sources/navigation-changed-iframe.html"; | 22 parent.location = "http://localhost:8000/security/frameNavigation/re
sources/navigation-changed-iframe.html"; |
15 } | 23 } |
| 24 |
| 25 window.addEventListener("message", startTest, false); |
16 </script> | 26 </script> |
17 </head> | 27 </head> |
18 <body onload="loaded();"> | 28 <body onload="loaded();"> |
19 <h4>DOMAIN</h4> | 29 <h4>DOMAIN</h4> |
20 <button onclick="performTest();">Perform Test</button> | 30 <button id="b" onclick="performTest();">Perform Test</button> |
21 </body> | 31 </body> |
22 </html> | 32 </html> |
OLD | NEW |