OLD | NEW |
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 Loading... |
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 Loading... |
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> |
OLD | NEW |