| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 | 4 |
| 5 if (window.testRunner) { | 5 if (window.testRunner) { |
| 6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
| 7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
| 8 } | 8 } |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 if (window.eventSender) { | 11 if (window.eventSender) { |
| 12 // Mouse events only work after an initial layout |
| 13 document.body.offsetLeft; |
| 12 eventSender.mouseMoveTo(52, 52); | 14 eventSender.mouseMoveTo(52, 52); |
| 13 eventSender.mouseDown(); | 15 eventSender.mouseDown(); |
| 14 eventSender.mouseUp(); | 16 eventSender.mouseUp(); |
| 15 } | 17 } |
| 16 window.setTimeout('finish()', 0); | 18 window.setTimeout('finish()', 0); |
| 17 } | 19 } |
| 18 | 20 |
| 19 function finish() | 21 function finish() |
| 20 { | 22 { |
| 21 if (window.testRunner) | 23 if (window.testRunner) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 32 </head> | 34 </head> |
| 33 <body onload="test()"> | 35 <body onload="test()"> |
| 34 Tests that preventDefault() will still allow window events to bubble. | 36 Tests that preventDefault() will still allow window events to bubble. |
| 35 <div id="d1" style="position: absolute; top: 50; left: 50; border: solid thi
n" onclick="log('preventDefault called. Test Failed.'); event.preventDefault();
"> | 37 <div id="d1" style="position: absolute; top: 50; left: 50; border: solid thi
n" onclick="log('preventDefault called. Test Failed.'); event.preventDefault();
"> |
| 36 Clicking here should fire window.onclick. This will match Firefox behavi
or. | 38 Clicking here should fire window.onclick. This will match Firefox behavi
or. |
| 37 </div> | 39 </div> |
| 38 | 40 |
| 39 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> | 41 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> |
| 40 </body> | 42 </body> |
| 41 </html> | 43 </html> |
| OLD | NEW |