Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: LayoutTests/fast/events/overflow-scroll-fake-mouse-move.html

Issue 1306993002: Cleanup friends of LayoutObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
12 function fail()
13 {
14 document.getElementById("result").innerText = "FAIL";
15 testRunner.notifyDone();
16 }
17
19 if (window.testRunner) { 18 if (window.testRunner) {
20 testRunner.dumpAsText(); 19 testRunner.dumpAsText();
21 testRunner.waitUntilDone(); 20 testRunner.waitUntilDone();
22 21
23 // WebKit schedules a fake mouse move event as part of installing the We bView in 22 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 { 23 {
28 eventSender.mouseMoveTo(50, 100); 24 eventSender.mouseMoveTo(50, 100);
29 document.getElementById("target").scrollTop = 250; 25 document.getElementById("target").scrollTop = 250;
30 setTimeout(finish, 200); 26 setTimeout(fail, 1000);
esprehn 2015/08/21 21:20:31 A 1 second timeout is really bad, what is this tes
Xianzhu 2015/08/21 22:52:19 This timeout happens only on failure. Previously w
31 }, 200); 27 };
32 } 28 }
33 </script> 29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698