Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: LayoutTests/fast/css/recalc-direct-adjacent-001.html

Issue 155283002: Count consecutive direct adjacent selectors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/recalc-direct-adjacent-001-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/recalc-direct-adjacent-001.html
diff --git a/LayoutTests/fast/css/recalc-direct-adjacent-001.html b/LayoutTests/fast/css/recalc-direct-adjacent-001.html
new file mode 100644
index 0000000000000000000000000000000000000000..3ac6c5f1ddb83255018db51c1140c242246f7a6a
--- /dev/null
+++ b/LayoutTests/fast/css/recalc-direct-adjacent-001.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+ body { color: black; }
+ .match+div div+div { color: green; }
+</style>
+<div>
+ <div id="top"></div>
+ <div>
+ <div></div>
+ <div id="green"></div>
+ </div>
+ <div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+</div>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+description("Check that we don't do unnecessary style recalcs for sibling trees.");
+
+if (window.internals)
+ internals.updateStyleAndReturnAffectedElementCount();
+
+document.getElementById("top").className = "match";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
+
+shouldBe("getComputedStyle(document.getElementById('green'), null).color", "'rgb(0, 128, 0)'");
+
+successfullyParsed = true;
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/recalc-direct-adjacent-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698