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; | |
14 eventSender.mouseMoveTo(52, 52); | 12 eventSender.mouseMoveTo(52, 52); |
15 eventSender.mouseDown(); | 13 eventSender.mouseDown(); |
16 eventSender.mouseUp(); | 14 eventSender.mouseUp(); |
17 } | 15 } |
18 window.setTimeout('finish()', 0); | 16 window.setTimeout('finish()', 0); |
19 } | 17 } |
20 | 18 |
21 function finish() | 19 function finish() |
22 { | 20 { |
23 if (window.testRunner) | 21 if (window.testRunner) |
24 testRunner.notifyDone(); | 22 testRunner.notifyDone(); |
25 } | 23 } |
26 | 24 |
27 window.onclick = function(e) { log("Window.onClick fired. Test Failed."); }; | 25 window.onclick = function(e) { log("Window.onClick fired. Test Failed."); }; |
28 | 26 |
29 function log(text) { | 27 function log(text) { |
30 document.getElementById("result").innerHTML = text; | 28 document.getElementById("result").innerHTML = text; |
31 } | 29 } |
32 </script> | 30 </script> |
33 | 31 |
34 </head> | 32 </head> |
35 <body onload="test()"> | 33 <body onload="test()"> |
36 Test that stopPropagation() will not allow window events to bubble. | 34 Test that stopPropagation() will not allow window events to bubble. |
37 <div id="d1" style="position: absolute; top: 50; left: 50; border: solid thi
n" onclick="log('stopPropagation called. Test Passed.'); event.stopPropagation(
);"> | 35 <div id="d1" style="position: absolute; top: 50; left: 50; border: solid thi
n" onclick="log('stopPropagation called. Test Passed.'); event.stopPropagation(
);"> |
38 Clicking on this should not fire window.onclick. This matches our old b
ehavior and Firefox behavior. | 36 Clicking on this should not fire window.onclick. This matches our old b
ehavior and Firefox behavior. |
39 </div> | 37 </div> |
40 | 38 |
41 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> | 39 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> |
42 </body> | 40 </body> |
43 </html> | 41 </html> |
OLD | NEW |