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