| OLD | NEW |
| 1 <div id="target" style="overflow: auto; height: 200px; width: 200px;"> | 1 <div id="target" style="overflow: auto; height: 200px; width: 200px;"> |
| 2 <div onmouseover="mouseOver(event)" style="margin: 300px 0; width: 100px; he
ight: 100px; background-color: blue;"></div> | 2 <div onmouseover="mouseOver(event)" style="margin: 300px 0; width: 100px; he
ight: 100px; background-color: blue;"></div> |
| 3 </div> | 3 </div> |
| 4 <div id="result">Test did not run</div> | 4 <div id="result">Test needs DumpRenderTree</div> |
| 5 <script> | 5 <script> |
| 6 var passed = false; | |
| 7 | |
| 8 function mouseOver(event) | 6 function mouseOver(event) |
| 9 { | 7 { |
| 10 passed = true; | 8 document.getElementById("result").innerText = "PASS"; |
| 11 } | |
| 12 | |
| 13 function finish() | |
| 14 { | |
| 15 document.getElementById("result").innerText = passed ? "PASS" : "FAIL"; | |
| 16 testRunner.notifyDone(); | 9 testRunner.notifyDone(); |
| 17 } | 10 } |
| 18 | 11 |
| 19 if (window.testRunner) { | 12 if (window.testRunner) { |
| 20 testRunner.dumpAsText(); | 13 testRunner.dumpAsText(); |
| 21 testRunner.waitUntilDone(); | 14 testRunner.waitUntilDone(); |
| 22 | 15 |
| 23 // WebKit schedules a fake mouse move event as part of installing the We
bView in | 16 onload = function() |
| 24 // a window. For the test to be valid, it must begin only after that eve
nt | |
| 25 // gets dispatched. | |
| 26 setTimeout(function() | |
| 27 { | 17 { |
| 28 eventSender.mouseMoveTo(50, 100); | 18 eventSender.mouseMoveTo(50, 100); |
| 29 document.getElementById("target").scrollTop = 250; | 19 document.getElementById("target").scrollTop = 250; |
| 30 setTimeout(finish, 200); | 20 }; |
| 31 }, 200); | |
| 32 } | 21 } |
| 33 </script> | 22 </script> |
| OLD | NEW |