Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / indeterminate-pseudo.html
blob3dad0790c2991f90c8d6f445f1a5043469a28840
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 :indeterminate { background-color: green }
5 input + div { color: pink }
6 </style>
7 <input id="checkbox" type="checkbox"></input>
8 <div>
9 <div></div>
10 <div></div>
11 <div></div>
12 <div></div>
13 </div>
14 <script>
15 description("Use descendant invalidation set for :indeterminate pseudo class.")
17 var transparent = "rgba(0, 0, 0, 0)";
18 var green = "rgb(0, 128, 0)";
20 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "transparent");
22 checkbox.offsetTop; // Force recalc.
24 checkbox.indeterminate = true;
26 if (window.internals)
27 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
29 shouldBe("getComputedStyle(checkbox, '').backgroundColor", "green");
30 </script>