Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #red { | 5 #red { |
| 6 background-color: red; | 6 background-color: red; |
| 7 position: absolute; | 7 position: absolute; |
| 8 left: 50px; | 8 left: 50px; |
| 9 top: 50px; | 9 top: 50px; |
| 10 height: 100px; | 10 height: 100px; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 shouldBeEqualToString("redDiv.innerHTML", redTextWhenHovered); | 86 shouldBeEqualToString("redDiv.innerHTML", redTextWhenHovered); |
| 87 shouldBeEqualToString("blueDiv.innerHTML", blueTextWhenNotHovered); | 87 shouldBeEqualToString("blueDiv.innerHTML", blueTextWhenNotHovered); |
| 88 | 88 |
| 89 debug("Mouse is invisible, deleting the red div."); | 89 debug("Mouse is invisible, deleting the red div."); |
| 90 eventSender.keyDown("a"); | 90 eventSender.keyDown("a"); |
| 91 window.setTimeout(testAfterDeleteCursorInvisible, 0); | 91 window.setTimeout(testAfterDeleteCursorInvisible, 0); |
| 92 } | 92 } |
| 93 | 93 |
| 94 function testAfterDeleteCursorInvisible() | 94 function testAfterDeleteCursorInvisible() |
| 95 { | 95 { |
| 96 checkBlueHoverText(blueTextWhenNotHovered); | 96 checkBlueHoverText("none"); |
| 97 testRunner.notifyDone(); | 97 testRunner.notifyDone(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 | 100 |
| 101 // Helper functions | 101 // Helper functions |
| 102 | 102 |
| 103 function checkBlueHoverText(expectedText) | 103 function checkBlueHoverText(expectedText) |
|
alancutter (OOO until 2018)
2016/03/22 09:35:23
This should probably be renamed to checkBlueHoverC
nainar
2016/03/23 02:50:49
Done.
| |
| 104 { | 104 { |
| 105 shouldBe("blueDiv.offsetTop", "50"); | 105 shouldBe("blueDiv.offsetTop", "50"); |
| 106 blueText = window.getComputedStyle(document.querySelector('#blue'), ':after' ).content; | 106 blueText = window.getComputedStyle(document.querySelector('#blue'), ':after' ).content; |
| 107 shouldBeEqualToString("blueText", expectedText); | 107 shouldBeEqualToString("blueText", expectedText); |
| 108 } | 108 } |
| 109 | 109 |
| 110 function insertDivs() | 110 function insertDivs() |
| 111 { | 111 { |
| 112 debug("Adding the red and blue divs."); | 112 debug("Adding the red and blue divs."); |
| 113 blueDiv.style.top = "200px"; | 113 blueDiv.style.top = "200px"; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 131 </script> | 131 </script> |
| 132 | 132 |
| 133 <div id="container"> | 133 <div id="container"> |
| 134 </div> | 134 </div> |
| 135 | 135 |
| 136 <p>Test for <a href="http://crbug.com/240722">http://crbug.com/240722</a>. If th e mouse cursor is not visible, no new hover effects should be invoked when the c urrently hovered node is removed from the DOM. Press any key to delete the red d iv.</p> | 136 <p>Test for <a href="http://crbug.com/240722">http://crbug.com/240722</a>. If th e mouse cursor is not visible, no new hover effects should be invoked when the c urrently hovered node is removed from the DOM. Press any key to delete the red d iv.</p> |
| 137 | 137 |
| 138 <div id="console"></div> | 138 <div id="console"></div> |
| 139 </body> | 139 </body> |
| 140 </html> | 140 </html> |
| OLD | NEW |