| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 | 4 |
| 5 function out(event) | 5 function out(event) |
| 6 { | 6 { |
| 7 var m = document.getElementById("m1"); | 7 var m = document.getElementById("m1"); |
| 8 while (m.firstChild) | 8 while (m.firstChild) |
| 9 m.removeChild(m.firstChild); | 9 m.removeChild(m.firstChild); |
| 10 m.appendChild(document.createTextNode("Moved out of " | 10 m.appendChild(document.createTextNode("Moved out of " |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 if (window.testRunner) | 24 if (window.testRunner) |
| 25 testRunner.notifyDone(); | 25 testRunner.notifyDone(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function test() | 28 function test() |
| 29 { | 29 { |
| 30 if (window.testRunner) | 30 if (window.testRunner) |
| 31 testRunner.dumpAsText(); | 31 testRunner.dumpAsText(); |
| 32 | 32 |
| 33 if (window.eventSender) { | 33 if (window.eventSender) { |
| 34 // Mouse events only work after an initial layout |
| 35 document.body.offsetLeft; |
| 34 eventSender.mouseMoveTo(50, 50); | 36 eventSender.mouseMoveTo(50, 50); |
| 35 eventSender.mouseDown(); | 37 eventSender.mouseDown(); |
| 36 eventSender.mouseUp(); | 38 eventSender.mouseUp(); |
| 37 eventSender.mouseMoveTo(50, 150); | 39 eventSender.mouseMoveTo(50, 150); |
| 38 eventSender.mouseDown(); | 40 eventSender.mouseDown(); |
| 39 eventSender.mouseUp(); | 41 eventSender.mouseUp(); |
| 40 } | 42 } |
| 41 } | 43 } |
| 42 | 44 |
| 43 </script> | 45 </script> |
| 44 </head> | 46 </head> |
| 45 <body onload="test()"> | 47 <body onload="test()"> |
| 46 <div> | 48 <div> |
| 47 <div id="A" style="background-color: red; width:100px; height:100px" onmouseout=
"out(event)"></div> | 49 <div id="A" style="background-color: red; width:100px; height:100px" onmouseout=
"out(event)"></div> |
| 48 <div id="B" style="background-color: blue; width:100px; height:100px" onmouseove
r="over(event)"></div> | 50 <div id="B" style="background-color: blue; width:100px; height:100px" onmouseove
r="over(event)"></div> |
| 49 </div> | 51 </div> |
| 50 <p>This test checks that the relatedTarget property is set on mouse out and mous
e over events.</p> | 52 <p>This test checks that the relatedTarget property is set on mouse out and mous
e over events.</p> |
| 51 <p>To perform the test, move the mouse into the red box, and then drag it out of
the red box into the blue box.</p> | 53 <p>To perform the test, move the mouse into the red box, and then drag it out of
the red box into the blue box.</p> |
| 52 <p>The text below should say "Moved out of A to B. Moved over B from A."</p> | 54 <p>The text below should say "Moved out of A to B. Moved over B from A."</p> |
| 53 <span id="m1"></span> <span id="m2"></span> | 55 <span id="m1"></span> <span id="m2"></span> |
| 54 </body> | 56 </body> |
| 55 </html> | 57 </html> |
| OLD | NEW |