OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
4 <style> | 4 <style> |
5 #p1 :not(.t1), | 5 #p1 :not(.t1), |
6 #p2 :not(.t2) #r2, | 6 #p2 :not(.t2) #r2, |
7 #p3 :not(.t3) :not(.nomatch), | 7 #p3 :not(.t3) :not(.nomatch), |
8 #p4 .t4 :not(.nomatch), | 8 #p4 .t4 :not(.nomatch), |
9 #p5 :-webkit-any(:not(.t5), #dummy) #r5, | 9 #p5 :-webkit-any(:not(.t5), #dummy) #r5, |
10 #p6 .t6 #r6:not(.dummy), | 10 #p6 .t6 #r6:not(.dummy), |
(...skipping 108 matching lines...) Loading... |
119 | 119 |
120 t6.className = "t6"; | 120 t6.className = "t6"; |
121 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Reca
lc changed element and #r6"); | 121 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Reca
lc changed element and #r6"); |
122 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 122 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
123 }, "Negated class with id descendant of class"); | 123 }, "Negated class with id descendant of class"); |
124 | 124 |
125 test(function() { | 125 test(function() { |
126 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 126 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
127 | 127 |
128 t7.className = ""; | 128 t7.className = ""; |
129 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 4, "Reca
lc changed element and #r7"); | 129 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Reca
lc changed element and #r7"); |
130 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 130 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
131 }, "Id descendant of negated sibling class"); | 131 }, "Id descendant of negated sibling class"); |
132 | 132 |
133 test(function() { | 133 test(function() { |
134 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 134 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
135 | 135 |
136 t8.className = "t8"; | 136 t8.className = "t8"; |
137 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 6, "Subt
ree style recalc"); | 137 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
138 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 138 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
139 }, "Negated class descendant of sibling class"); | 139 }, "Negated class descendant of sibling class"); |
140 | 140 |
141 </script> | 141 </script> |
OLD | NEW |