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

Side by Side Diff: LayoutTests/fast/scrolling/hover-during-scroll.html

Issue 14859016: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix review comment Created 7 years, 7 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 div { 5 div {
6 line-height: 50px; 6 line-height: 50px;
7 } 7 }
8 8
9 .hoverme { 9 .hoverme {
10 background-color: lightblue; 10 background-color: lightblue;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (!window.testRunner || !window.eventSender) 96 if (!window.testRunner || !window.eventSender)
97 return; 97 return;
98 98
99 if (!window.internals || !window.internals.setIsCursorVisible) { 99 if (!window.internals || !window.internals.setIsCursorVisible) {
100 debug("window.internals.setIsCursorVisible is required to run this test. "); 100 debug("window.internals.setIsCursorVisible is required to run this test. ");
101 return; 101 return;
102 } 102 }
103 103
104 testRunner.waitUntilDone(); 104 testRunner.waitUntilDone();
105 105
106 // Mouse events only work after an initial layout
107 document.body.offsetLeft;
108
106 debug("Mouse is visible, moving it over the first div."); 109 debug("Mouse is visible, moving it over the first div.");
107 internals.setIsCursorVisible(document, true); 110 internals.setIsCursorVisible(document, true);
108 eventSender.mouseMoveTo(42, centerOfDivAtIndex(0)); 111 eventSender.mouseMoveTo(42, centerOfDivAtIndex(0));
109 shouldBeEqualToString("array[0].innerHTML", textWhenHovered); 112 shouldBeEqualToString("array[0].innerHTML", textWhenHovered);
110 shouldBeEqualToString("array[1].innerHTML", textWhenNotHovered); 113 shouldBeEqualToString("array[1].innerHTML", textWhenNotHovered);
111 114
112 debug("Mouse is visible, moving it over the second div."); 115 debug("Mouse is visible, moving it over the second div.");
113 eventSender.mouseMoveTo(53, centerOfDivAtIndex(1)); 116 eventSender.mouseMoveTo(53, centerOfDivAtIndex(1));
114 shouldBeEqualToString("array[0].innerHTML", textWhenWasHovered); 117 shouldBeEqualToString("array[0].innerHTML", textWhenWasHovered);
115 shouldBeEqualToString("array[1].innerHTML", textWhenHovered); 118 shouldBeEqualToString("array[1].innerHTML", textWhenHovered);
(...skipping 20 matching lines...) Expand all
136 139
137 <table id="table_to_fill" width="100%" cellpadding="0px" cellspacing="0px" borde r="0px"> 140 <table id="table_to_fill" width="100%" cellpadding="0px" cellspacing="0px" borde r="0px">
138 <tr><td><div class="hoverme">hover over me</div></td></tr> 141 <tr><td><div class="hoverme">hover over me</div></td></tr>
139 </table> 142 </table>
140 143
141 <p>Test for <a href="http://crbug.com/153784">http://crbug.com/153784</a>. New h over effects should not be invoked during scroll if the mouse cursor is not visi ble.</p> 144 <p>Test for <a href="http://crbug.com/153784">http://crbug.com/153784</a>. New h over effects should not be invoked during scroll if the mouse cursor is not visi ble.</p>
142 145
143 <div id="console"></div> 146 <div id="console"></div>
144 </body> 147 </body>
145 </html> 148 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/replaced/image-map-bug16782.html ('k') | LayoutTests/fast/text/atsui-rtl-override-selection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698