Add a script to run ImageDiff manually
[WebKit-https.git] / LayoutTests / fast / events / frame-scroll-fake-mouse-move.html
1 <body style="height: 200%">
2 <div onmouseover="mouseOver(event)" style="margin: 300px 0; width: 100px; height: 100px; background-color: blue;"></div>
3 <div id="result">Test did not run</div>
4 <script>
5     var passed = false;
6
7     function mouseOver(event)
8     {
9         passed = true;
10         clearTimeout(timeoutID);
11         finish();
12     }
13
14     function finish()
15     {
16         document.getElementById("result").innerText = passed ? "PASS" : "FAIL";
17         testRunner.notifyDone();
18     }
19
20     if (window.testRunner) {
21         testRunner.dumpAsText();
22         testRunner.waitUntilDone();
23
24         // WebKit schedules a fake mouse move event as part of installing the WebView in
25         // a window. For the test to be valid, it must begin only after that event
26         // gets dispatched.
27         setTimeout(function()
28         {
29             eventSender.mouseMoveTo(50, 100);
30             document.scrollingElement.scrollTop = 250;
31             timeoutID = setTimeout(finish, 20000);
32         }, 200);
33     }
34 </script>