OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 .test { width: 100px; height: 100px } | 4 .test { width: 100px; height: 100px } |
5 .test:hover { background-color: green } | 5 .test:hover { background-color: green } |
6 .over { width: 150px } | 6 .over { width: 150px } |
7 </style> | 7 </style> |
8 <div id="t1" class="test"></div> | 8 <div id="t1" class="test"></div> |
9 <div id="t2" class="test"><div></div></div> | 9 <div id="t2" class="test"><div></div></div> |
10 <div id="t3" class="test" onmouseover="this.firstChild.className='over'"><div></
div></div> | 10 <div id="t3" class="test" onmouseover="this.firstChild.className='over'"><div></
div></div> |
(...skipping 10 matching lines...) Expand all Loading... |
21 var t2 = document.getElementById("t2"); | 21 var t2 = document.getElementById("t2"); |
22 var t3 = document.getElementById("t3"); | 22 var t3 = document.getElementById("t3"); |
23 | 23 |
24 shouldBe("getComputedStyle(t1, null).backgroundColor", "transparent"); | 24 shouldBe("getComputedStyle(t1, null).backgroundColor", "transparent"); |
25 shouldBe("getComputedStyle(t2, null).backgroundColor", "transparent"); | 25 shouldBe("getComputedStyle(t2, null).backgroundColor", "transparent"); |
26 | 26 |
27 var x1 = t1.offsetLeft + 1; | 27 var x1 = t1.offsetLeft + 1; |
28 var y1 = t1.offsetTop + 1; | 28 var y1 = t1.offsetTop + 1; |
29 | 29 |
30 eventSender.mouseMoveTo(x1, y1); | 30 eventSender.mouseMoveTo(x1, y1); |
31 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 31 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1"); |
32 shouldBe("getComputedStyle(t1, null).backgroundColor", "green"); | 32 shouldBe("getComputedStyle(t1, null).backgroundColor", "green"); |
33 | 33 |
34 var x2 = t2.offsetLeft + 1; | 34 var x2 = t2.offsetLeft + 1; |
35 var y2 = t2.offsetTop + 1; | 35 var y2 = t2.offsetTop + 1; |
36 | 36 |
37 eventSender.mouseMoveTo(0, 0); | 37 eventSender.mouseMoveTo(0, 0); |
38 eventSender.mouseMoveTo(x2, y2); | 38 eventSender.mouseMoveTo(x2, y2); |
39 t2.firstChild.className = "over"; | 39 t2.firstChild.className = "over"; |
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 40 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2"); |
41 shouldBe("getComputedStyle(t2, null).backgroundColor", "green"); | 41 shouldBe("getComputedStyle(t2, null).backgroundColor", "green"); |
42 shouldBe("getComputedStyle(t2.firstChild, null).width", "'150px'"); | 42 shouldBe("getComputedStyle(t2.firstChild, null).width", "'150px'"); |
43 | 43 |
44 var x3 = t3.offsetLeft + 1; | 44 var x3 = t3.offsetLeft + 1; |
45 var y3 = t3.offsetTop + 1; | 45 var y3 = t3.offsetTop + 1; |
46 eventSender.mouseMoveTo(0, 0); | 46 eventSender.mouseMoveTo(0, 0); |
47 eventSender.mouseMoveTo(x3, y3); | 47 eventSender.mouseMoveTo(x3, y3); |
48 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 48 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2"); |
49 shouldBe("getComputedStyle(t3, null).backgroundColor", "green"); | 49 shouldBe("getComputedStyle(t3, null).backgroundColor", "green"); |
50 shouldBe("getComputedStyle(t3.firstChild, null).width", "'150px'"); | 50 shouldBe("getComputedStyle(t3.firstChild, null).width", "'150px'"); |
51 </script> | 51 </script> |
OLD | NEW |