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 document.getElementById("target").addEventListener("click", targetClick, tru
e); | 11 document.getElementById("target").addEventListener("click", targetClick, tru
e); |
12 | 12 |
13 if (window.eventSender) { | 13 if (window.eventSender) { |
| 14 // Mouse events only work after an initial layout |
| 15 document.body.offsetLeft; |
14 eventSender.mouseMoveTo(52, 52); | 16 eventSender.mouseMoveTo(52, 52); |
15 eventSender.mouseDown(); | 17 eventSender.mouseDown(); |
16 eventSender.mouseUp(); | 18 eventSender.mouseUp(); |
17 window.setTimeout(finish, 0); | 19 window.setTimeout(finish, 0); |
18 } | 20 } |
19 } | 21 } |
20 | 22 |
21 var finished = false; | 23 var finished = false; |
22 function finish() | 24 function finish() |
23 { | 25 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 <body onload="test()"> | 61 <body onload="test()"> |
60 | 62 |
61 <p>This tests checks that capturing event handlers trigger on the node that
is the target of the event, and that stopPropagation in such a handler prevents
further bubble handlers from triggering.</p> | 63 <p>This tests checks that capturing event handlers trigger on the node that
is the target of the event, and that stopPropagation in such a handler prevents
further bubble handlers from triggering.</p> |
62 <div onclick="containerClick(event)"> | 64 <div onclick="containerClick(event)"> |
63 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40
; background-color: pink" id="target" onclick="targetClick(event)">Click here</a
> | 65 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40
; background-color: pink" id="target" onclick="targetClick(event)">Click here</a
> |
64 </div> | 66 </div> |
65 | 67 |
66 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> | 68 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> |
67 </body> | 69 </body> |
68 </html> | 70 </html> |
OLD | NEW |