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; | |
16 eventSender.mouseMoveTo(52, 52); | 14 eventSender.mouseMoveTo(52, 52); |
17 eventSender.mouseDown(); | 15 eventSender.mouseDown(); |
18 eventSender.mouseUp(); | 16 eventSender.mouseUp(); |
19 window.setTimeout(finish, 0); | 17 window.setTimeout(finish, 0); |
20 } | 18 } |
21 } | 19 } |
22 | 20 |
23 var finished = false; | 21 var finished = false; |
24 function finish() | 22 function finish() |
25 { | 23 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 <body onload="test()"> | 59 <body onload="test()"> |
62 | 60 |
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> | 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> |
64 <div onclick="containerClick(event)"> | 62 <div onclick="containerClick(event)"> |
65 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40
; background-color: pink" id="target" onclick="targetClick(event)">Click here</a
> | 63 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40
; background-color: pink" id="target" onclick="targetClick(event)">Click here</a
> |
66 </div> | 64 </div> |
67 | 65 |
68 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> | 66 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> |
69 </body> | 67 </body> |
70 </html> | 68 </html> |
OLD | NEW |