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

Unified Diff: LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo.html

Issue 174013010: Make selector list pseudos work with class invalidation sets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More readable colors. 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/invalidation/dynamic-selector-list-pseudo-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo.html b/LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..edbe8ec80c91fe2dfb82a49d96c751e794d5c151
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.a1 .a2:-webkit-any(.a3, .a4) { background-color: green }
+.b1 .b2:not(.b3) { background-color: green }
+.c1 .c2:-webkit-any(:not(.c3)) { background-color: green }
+.d1:not(.d2) .d3 { background-color: green; }
+.e1 :not(.e2) { background-color: green; }
+</style>
+<div class="a1">
+ <div class="a2" id="t1">Background should be green</div>
+</div>
+<div class="b1">
+ <div class="b2 b3" id="t2">Background should be green</div>
+</div>
+<div class="c1">
+ <div class="c2 c3" id="t3">Background should be green</div>
+</div>
+<div id="outer-d" class="d1 d2">
+ <div id="t4" class="d3">Background should be green</div>
+</div>
+<div id="outer-e">
+ <div id="t5">Background should be green</div>
+</div>
+<script>
+description("Change classes affecting :-webkit-any and :not.")
+
+document.body.offsetTop; // force style recalc.
+
+var transparent = 'rgba(0, 0, 0, 0)';
+var green = 'rgb(0, 128, 0)';
+
+var t1 = document.getElementById("t1");
+shouldBe("getComputedStyle(t1, null).backgroundColor", "transparent");
+t1.className = "a2 a3";
+shouldBe("getComputedStyle(t1, null).backgroundColor", "green");
+
+var t2 = document.getElementById("t2");
+shouldBe("getComputedStyle(t2, null).backgroundColor", "transparent");
+t2.className = "b2";
+shouldBe("getComputedStyle(t2, null).backgroundColor", "green");
+
+var t3 = document.getElementById("t3");
+shouldBe("getComputedStyle(t3, null).backgroundColor", "transparent");
+t3.className = "c2";
+shouldBe("getComputedStyle(t3, null).backgroundColor", "green");
+
+var t4 = document.getElementById("t4");
+shouldBe("getComputedStyle(t4, null).backgroundColor", "transparent");
+document.getElementById("outer-d").className = "d1";
+shouldBe("getComputedStyle(t4, null).backgroundColor", "green");
+
+var t5 = document.getElementById("t5");
+shouldBe("getComputedStyle(t5, null).backgroundColor", "transparent");
+document.getElementById("outer-e").className = "e1";
+shouldBe("getComputedStyle(t5, null).backgroundColor", "green");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/dynamic-selector-list-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698