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

Unified Diff: LayoutTests/fast/css/invalidation/no-invalidation-set-local-style.html

Issue 199373003: Use LocalStyleChange for classes in rightmost compound selector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Changed naming of InvalidationSetModes. Created 6 years, 9 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/invalidation/no-invalidation-set-local-style-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/no-invalidation-set-local-style.html
diff --git a/LayoutTests/fast/css/invalidation/no-invalidation-set-local-style.html b/LayoutTests/fast/css/invalidation/no-invalidation-set-local-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..75f15727eda5e840899cdae17d0dcfb302f79044
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/no-invalidation-set-local-style.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+ #t1 div + .test { background-color: green }
+ #t2 div ~ .test { background-color: green }
+ #t3 :not(.nomatch) .test { background-color: green }
+</style>
+<div id="t1">
+ <div></div>
+ <div>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+</div>
+<div id="t2">
+ <div></div>
+ <span></span>
+ <div>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+</div>
+<div id="t3">
+ <div>
+ <div>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+ </div>
+</div>
+<script>
+description("Class selectors in rightmost compound selector should cause LocalStyleChange even if we cannot use invalidation sets.");
+
+var tests = [
+ [ "#t1 > div + div", 1 ],
+ [ "#t2 > div ~ div", 1 ],
+ [ "#t3 > div > div", 1 ]
+];
+
+var green = 'rgb(0, 128, 0)';
+
+for (var i=0; i<tests.length; i++) {
+ var test = tests[i];
+ var elm = document.querySelector(test[0]);
+ document.body.offsetLeft;
+ elm.className = "test";
+ if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "" + test[1]);
+ shouldBe("getComputedStyle(elm, null).backgroundColor", "green");
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/no-invalidation-set-local-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698