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

Side by Side Diff: LayoutTests/fast/css/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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/css/dynamic-selector-list-pseudo-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
chrishtr 2014/02/20 22:34:49 Add to the targetedstylerecalc virtual test suite
rune 2014/02/20 22:59:33 Done.
2 <script src="../../resources/js-test.js"></script>
3 <style>
4 .a1 .a2:-webkit-any(.a3, .a4) { background-color: green }
5 .b1 .b2:not(.b3) { background-color: green }
6 .c1 .c2:-webkit-any(:not(.c3)) { background-color: green }
7 .d1:not(.d2) .d3 { background-color: green; }
8 .e1 :not(.e2) { background-color: green; }
9 </style>
10 <div class="a1">
11 <div class="a2" id="t1">Background should be green</div>
12 </div>
13 <div class="b1">
14 <div class="b2 b3" id="t2">Background should be green</div>
15 </div>
16 <div class="c1">
17 <div class="c2 c3" id="t3">Background should be green</div>
18 </div>
19 <div id="t4" class="d1 d2">
20 <div id="t5" class="d3">Background should be green</div>
21 </div>
22 <div id="t6">
23 <div id="t7">Background should be green.</div>
24 </div>
25 <script>
26 description("Change classes affecting :-webkit-any and :not.")
27
28 document.body.offsetTop; // force style recalc.
29
30 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.
31 t1.className = "a2 a3";
32 shouldBe("getComputedStyle(t1, null).backgroundColor", "'rgb(0, 128, 0)'");
33
34 var t2 = document.getElementById("t2");
35 t2.className = "b2";
36 shouldBe("getComputedStyle(t2, null).backgroundColor", "'rgb(0, 128, 0)'");
37
38 var t3 = document.getElementById("t3");
39 t3.className = "c2";
40 shouldBe("getComputedStyle(t3, null).backgroundColor", "'rgb(0, 128, 0)'");
41
42 document.getElementById("t4").className = "d1";
43 shouldBe("getComputedStyle(document.getElementById('t5'), null).backgroundColor" , "'rgb(0, 128, 0)'");
44
45 document.getElementById("t6").className = "e1";
46 shouldBe("getComputedStyle(document.getElementById('t7'), null).backgroundColor" , "'rgb(0, 128, 0)'");
47 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/dynamic-selector-list-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698