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 :indeterminate { background-color: green } | 4 :indeterminate { background-color: green } |
5 input + div { color: pink } | 5 input + div { color: pink } |
6 </style> | 6 </style> |
7 <input id="checkbox" type="checkbox"></input> | 7 <input id="checkbox" type="checkbox"></input> |
8 <div> | 8 <div> |
9 <div></div> | 9 <div></div> |
10 <div></div> | 10 <div></div> |
11 <div></div> | 11 <div></div> |
12 <div></div> | 12 <div></div> |
13 </div> | 13 </div> |
14 <script> | 14 <script> |
15 description("Use descendant invalidation set for :indeterminate pseudo class.") | 15 description("Use descendant invalidation set for :indeterminate pseudo class.") |
16 | 16 |
17 var transparent = "rgba(0, 0, 0, 0)"; | 17 var transparent = "rgba(0, 0, 0, 0)"; |
18 var green = "rgb(0, 128, 0)"; | 18 var green = "rgb(0, 128, 0)"; |
19 | 19 |
20 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "transparent"); | 20 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "transparent"); |
21 | 21 |
22 checkbox.offsetTop; // Force recalc. | 22 checkbox.offsetTop; // Force recalc. |
23 | 23 |
24 checkbox.indeterminate = true; | 24 checkbox.indeterminate = true; |
25 | 25 |
26 if (window.internals) | 26 if (window.internals) |
27 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 27 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1
"); |
28 | 28 |
29 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "green"); | 29 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "green"); |
30 </script> | 30 </script> |
OLD | NEW |