OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function print(message, color) { | 4 function print(message, color) { |
5 var paragraph = document.createElement("div"); | 5 var paragraph = document.createElement("div"); |
6 paragraph.appendChild(document.createTextNode(message)); | 6 paragraph.appendChild(document.createTextNode(message)); |
7 paragraph.style.fontFamily = "monospace"; | 7 paragraph.style.fontFamily = "monospace"; |
8 if (color) | 8 if (color) |
9 paragraph.style.color = color; | 9 paragraph.style.color = color; |
10 document.getElementById("console").appendChild(paragraph); | 10 document.getElementById("console").appendChild(paragraph); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 function test() { | 65 function test() { |
66 if (window.testRunner) { | 66 if (window.testRunner) { |
67 testRunner.dumpAsText(); | 67 testRunner.dumpAsText(); |
68 testRunner.waitUntilDone(); | 68 testRunner.waitUntilDone(); |
69 } | 69 } |
70 | 70 |
71 document.getElementById('test').addEventListener("click", listener, false); | 71 document.getElementById('test').addEventListener("click", listener, false); |
72 | 72 |
73 if (window.eventSender) { | 73 if (window.eventSender) { |
74 // Mouse events only work after an initial layout | |
75 document.body.offsetLeft; | |
76 eventSender.mouseMoveTo(175, 105); | 74 eventSender.mouseMoveTo(175, 105); |
77 eventSender.mouseDown(); | 75 eventSender.mouseDown(); |
78 eventSender.mouseUp(); | 76 eventSender.mouseUp(); |
79 } | 77 } |
80 | 78 |
81 if (window.testRunner) | 79 if (window.testRunner) |
82 testRunner.notifyDone(); | 80 testRunner.notifyDone(); |
83 } | 81 } |
84 </script> | 82 </script> |
85 </head> | 83 </head> |
86 <body onload="test();"> | 84 <body onload="test();"> |
87 <p>This page tests whether a click event propogates with the correct target and
positioning. | 85 <p>This page tests whether a click event propogates with the correct target and
positioning. |
88 See <a href="rdar://problem/4477126">rdar://problem/4477126</a>. | 86 See <a href="rdar://problem/4477126">rdar://problem/4477126</a>. |
89 </p> | 87 </p> |
90 <hr> | 88 <hr> |
91 <div style="position:absolute; top: 100"> | 89 <div style="position:absolute; top: 100"> |
92 click inside the red box:<span id="test" style="position:absolute; left:160; col
or:red">[]</span> | 90 click inside the red box:<span id="test" style="position:absolute; left:160; col
or:red">[]</span> |
93 </div> | 91 </div> |
94 <div style="position:absolute; top: 150;" id='console'></div> | 92 <div style="position:absolute; top: 150;" id='console'></div> |
95 </body> | 93 </body> |
96 </html> | 94 </html> |
OLD | NEW |