Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / recalc-direct-adjacent-002.html
blob13970a0984d5c19e5661d80434e283ae24b5df63
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 body { color: black; }
5 .match + .sibling div+div { color: green; }
6 </style>
7 <div>
8 <div id="top"></div>
9 <div class="sibling">
10 <div></div>
11 <div id="green"></div>
12 </div>
13 <div>
14 <div></div>
15 </div>
16 </div>
17 <script>
18 if (window.testRunner)
19 testRunner.dumpAsText();
21 description("Check that we don't do unnecessary style recalcs for sibling trees.");
23 if (window.internals)
24 internals.updateStyleAndReturnAffectedElementCount();
26 document.getElementById("top").className = "match";
28 if (window.internals)
29 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
31 shouldBe("getComputedStyle(document.getElementById('green'), null).color", "'rgb(0, 128, 0)'");
33 successfullyParsed = true;
34 </script>