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