Index: LayoutTests/fast/css/dynamic-selector-list-pseudo.html |
diff --git a/LayoutTests/fast/css/dynamic-selector-list-pseudo.html b/LayoutTests/fast/css/dynamic-selector-list-pseudo.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..57073cb44d0874537a3b865607e3f115257625fb |
--- /dev/null |
+++ b/LayoutTests/fast/css/dynamic-selector-list-pseudo.html |
@@ -0,0 +1,47 @@ |
+<!DOCTYPE html> |
chrishtr
2014/02/20 22:34:49
Add to the targetedstylerecalc virtual test suite
rune
2014/02/20 22:59:33
Done.
|
+<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="t4" class="d1 d2"> |
+ <div id="t5" class="d3">Background should be green</div> |
+</div> |
+<div id="t6"> |
+ <div id="t7">Background should be green.</div> |
+</div> |
+<script> |
+description("Change classes affecting :-webkit-any and :not.") |
+ |
+document.body.offsetTop; // force style recalc. |
+ |
+var t1 = document.getElementById("t1"); |
chrishtr
2014/02/20 22:34:49
Check that the color is black before you add the a
rune
2014/02/20 22:59:33
Done.
|
+t1.className = "a2 a3"; |
+shouldBe("getComputedStyle(t1, null).backgroundColor", "'rgb(0, 128, 0)'"); |
+ |
+var t2 = document.getElementById("t2"); |
+t2.className = "b2"; |
+shouldBe("getComputedStyle(t2, null).backgroundColor", "'rgb(0, 128, 0)'"); |
+ |
+var t3 = document.getElementById("t3"); |
+t3.className = "c2"; |
+shouldBe("getComputedStyle(t3, null).backgroundColor", "'rgb(0, 128, 0)'"); |
+ |
+document.getElementById("t4").className = "d1"; |
+shouldBe("getComputedStyle(document.getElementById('t5'), null).backgroundColor", "'rgb(0, 128, 0)'"); |
+ |
+document.getElementById("t6").className = "e1"; |
+shouldBe("getComputedStyle(document.getElementById('t7'), null).backgroundColor", "'rgb(0, 128, 0)'"); |
+</script> |