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

Unified Diff: LayoutTests/fast/css/invalidation/invalidation-set-not.html

Issue 1317533002: Sibling invalidation sets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sibling-inserted Created 5 years, 4 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
Index: LayoutTests/fast/css/invalidation/invalidation-set-not.html
diff --git a/LayoutTests/fast/css/invalidation/invalidation-set-not.html b/LayoutTests/fast/css/invalidation/invalidation-set-not.html
index b03dcd0105825b7764df1b13c19b839415c8d1f5..c0aa2fd049df618392ef1f4dd9cb12002d288a28 100644
--- a/LayoutTests/fast/css/invalidation/invalidation-set-not.html
+++ b/LayoutTests/fast/css/invalidation/invalidation-set-not.html
@@ -7,7 +7,9 @@
#p3 :not(.t3) :not(.nomatch),
#p4 .t4 :not(.nomatch),
#p5 :-webkit-any(:not(.t5), #dummy) #r5,
-#p6 .t6 #r6:not(.dummy) { background-color: rgb(0, 128, 0); }
+#p6 .t6 #r6:not(.dummy),
+#p7 + :not(.t7) + :not(.nomatch) #r7,
+#p8 + .t8 ~ div :not(.nomatch) { background-color: rgb(0, 128, 0); }
</style>
<div id="p1">
<div id="t1" class="t1">
@@ -45,6 +47,24 @@
<div id="r6"></div>
</div>
</div>
+<div>
+ <div id="p7"></div>
+ <div id="t7" class="t7"></div>
+ <div>
+ <div></div>
+ <div id="r7"></div>
+ </div>
+</div>
+<div>
+ <div id="p8"></div>
+ <div id="t8"></div>
+ <div>
+ <div></div>
+ <div id="r8"></div>
+ </div>
+ <div></div>
+</div>
+
<script>
document.body.offsetTop;
@@ -101,4 +121,23 @@ test(function() {
assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Recalc changed element and #r6");
assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change");
}, "Negated class with id descendant of class");
+
+test(function() {
+ assert_true(!!window.internals, "This test only works with internals exposed present");
+ assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Background color should initially be transparent");
+
+ t7.className = "";
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Recalc changed element and #r7");
+ assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change");
+}, "Id descendant of negated sibling class");
+
+test(function() {
+ assert_true(!!window.internals, "This test only works with internals exposed present");
+ assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Background color should initially be transparent");
+
+ t8.className = "t8";
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 4, "Subtree style recalc");
+ assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change");
+}, "Negated class descendant of sibling class");
+
</script>

Powered by Google App Engine
This is Rietveld 408576698