Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / sub-selector-adjacent-cancellation.html
blobc1c5c0096c681d7ef42890dd4594bc774d09d6de
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 :not(.x).a + #b { background-color: green }
5 </style>
6 <div id="a"></div>
7 <div id="b"></div>
8 <script>
9 description("Negated selector should not clear adjacent combinator flag.")
11 var transparent = "rgba(0, 0, 0, 0)";
12 var green = "rgb(0, 128, 0)";
14 shouldBe("getComputedStyle(b).backgroundColor", "transparent");
16 a.offsetTop; // Force recalc.
17 a.className = "a";
19 if (window.internals)
20 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
21 else
22 a.offsetTop; // Force recalc (crbug.com/436064)
24 shouldBe("getComputedStyle(b).backgroundColor", "green");
25 </script>