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 .a1 span { background-color: green } | 4 .a1 span { background-color: green } |
5 .a2 span + div { background-color: green } | 5 .a2 span + div { background-color: green } |
6 .a3 * { background-color: green } | 6 .a3 * { background-color: green } |
7 </style> | 7 </style> |
8 <div id="t1"> | 8 <div id="t1"> |
9 <span></span> | 9 <span></span> |
10 <span></span> | 10 <span></span> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 51 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); |
52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green"); | 52 shouldBe("getComputedStyle(children[0][0], null).backgroundColor", "green"); |
53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green"); | 53 shouldBe("getComputedStyle(children[0][1], null).backgroundColor", "green"); |
54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent"
); | 54 shouldBe("getComputedStyle(children[0][2], null).backgroundColor", "transparent"
); |
55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent"
); | 55 shouldBe("getComputedStyle(children[0][3], null).backgroundColor", "transparent"
); |
56 | 56 |
57 document.body.offsetLeft; // force style recalc. | 57 document.body.offsetLeft; // force style recalc. |
58 | 58 |
59 document.getElementById("t2").className = "a2"; | 59 document.getElementById("t2").className = "a2"; |
60 if (window.internals) | 60 if (window.internals) |
61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); | 61 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); |
62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent"
); | 62 shouldBe("getComputedStyle(children[1][0], null).backgroundColor", "transparent"
); |
63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent"
); | 63 shouldBe("getComputedStyle(children[1][1], null).backgroundColor", "transparent"
); |
64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green"); | 64 shouldBe("getComputedStyle(children[1][2], null).backgroundColor", "green"); |
65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent"
); | 65 shouldBe("getComputedStyle(children[1][3], null).backgroundColor", "transparent"
); |
66 | 66 |
67 document.body.offsetLeft; // force style recalc. | 67 document.body.offsetLeft; // force style recalc. |
68 | 68 |
69 document.getElementById("t3").className = "a3"; | 69 document.getElementById("t3").className = "a3"; |
70 if (window.internals) | 70 if (window.internals) |
71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); | 71 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); |
72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green"); | 72 shouldBe("getComputedStyle(children[2][0], null).backgroundColor", "green"); |
73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green"); | 73 shouldBe("getComputedStyle(children[2][1], null).backgroundColor", "green"); |
74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green"); | 74 shouldBe("getComputedStyle(children[2][2], null).backgroundColor", "green"); |
75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green"); | 75 shouldBe("getComputedStyle(children[2][3], null).backgroundColor", "green"); |
76 | 76 |
77 </script> | 77 </script> |
OLD | NEW |