| 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 .t1 span.c#r1, | 5 .t1 span.c#r1, |
| 6 .t2 *.c#r2, | 6 .t2 *.c#r2, |
| 7 .t3 span.c, | 7 .t3 span.c, |
| 8 .t4 *.ca.cb, | 8 .t4 *.ca.cb, |
| 9 .t5 :-webkit-any(div.ca.cb, *.cc.cd#r5b), | 9 .t5 :-webkit-any(div.ca.cb, *.cc.cd#r5b), |
| 10 .t6 ~ div > span.c#r6, | 10 .t6 ~ div > span.c#r6, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 t5.className = "t5"; | 165 t5.className = "t5"; |
| 166 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subt
ree style recalc"); | 166 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subt
ree style recalc"); |
| 167 assert_equals(getComputedStyle(r5a).backgroundColor, "rgb(0, 128, 0)", "Back
ground color a is green after class change"); | 167 assert_equals(getComputedStyle(r5a).backgroundColor, "rgb(0, 128, 0)", "Back
ground color a is green after class change"); |
| 168 assert_equals(getComputedStyle(r5b).backgroundColor, "rgb(0, 128, 0)", "Back
ground color b is green after class change"); | 168 assert_equals(getComputedStyle(r5b).backgroundColor, "rgb(0, 128, 0)", "Back
ground color b is green after class change"); |
| 169 }, "Descendant with :-webkit-any containing compound selector"); | 169 }, "Descendant with :-webkit-any containing compound selector"); |
| 170 | 170 |
| 171 test(function() { | 171 test(function() { |
| 172 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 172 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 173 | 173 |
| 174 t6.className = "t6"; | 174 t6.className = "t6"; |
| 175 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 6, "Subt
ree style recalc"); | 175 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 4, "Subt
ree style recalc"); |
| 176 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 176 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 177 }, "Sibling with compound descendant containing id"); | 177 }, "Sibling with compound descendant containing id"); |
| 178 | 178 |
| 179 test(function() { | 179 test(function() { |
| 180 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 180 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 181 | 181 |
| 182 t7.className = "t7"; | 182 t7.className = "t7"; |
| 183 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Subt
ree style recalc"); | 183 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
| 184 // TODO(ericwilligers): Update Blink's implementation of sibling selector in
validation, so the following passes: | 184 // TODO(ericwilligers): Update Blink's implementation of sibling selector in
validation, so the following passes: |
| 185 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 185 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 186 }, "Sibling with compound descendant"); | 186 }, "Sibling with compound descendant"); |
| 187 | 187 |
| 188 test(function() { | 188 test(function() { |
| 189 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 189 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 190 | 190 |
| 191 t8.className = "t8"; | 191 t8.className = "t8"; |
| 192 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 11, "Sub
tree style recalc"); | 192 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 4, "Subt
ree style recalc"); |
| 193 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 193 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 194 }, "Compound sibling selector containing id"); | 194 }, "Compound sibling selector containing id"); |
| 195 | 195 |
| 196 test(function() { | 196 test(function() { |
| 197 assert_equals(getComputedStyle(r9).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 197 assert_equals(getComputedStyle(r9).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 198 | 198 |
| 199 t9.className = "t9"; | 199 t9.className = "t9"; |
| 200 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 9, "Subt
ree style recalc"); | 200 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
| 201 assert_equals(getComputedStyle(r9).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 201 assert_equals(getComputedStyle(r9).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 202 }, "Compound sibling selector"); | 202 }, "Compound sibling selector"); |
| 203 | 203 |
| 204 test(function() { | 204 test(function() { |
| 205 assert_equals(getComputedStyle(r10a).backgroundColor, "rgba(0, 0, 0, 0)", "B
ackground color a should initially be transparent"); | 205 assert_equals(getComputedStyle(r10a).backgroundColor, "rgba(0, 0, 0, 0)", "B
ackground color a should initially be transparent"); |
| 206 assert_equals(getComputedStyle(r10b).backgroundColor, "rgba(0, 0, 0, 0)", "B
ackground color b should initially be transparent"); | 206 assert_equals(getComputedStyle(r10b).backgroundColor, "rgba(0, 0, 0, 0)", "B
ackground color b should initially be transparent"); |
| 207 | 207 |
| 208 t10.className = "t10"; | 208 t10.className = "t10"; |
| 209 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 9, "Subt
ree style recalc"); | 209 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subt
ree style recalc"); |
| 210 assert_equals(getComputedStyle(r10a).backgroundColor, "rgb(0, 128, 0)", "Bac
kground color a is green after class change"); | 210 assert_equals(getComputedStyle(r10a).backgroundColor, "rgb(0, 128, 0)", "Bac
kground color a is green after class change"); |
| 211 assert_equals(getComputedStyle(r10b).backgroundColor, "rgb(0, 128, 0)", "Bac
kground color b is green after class change"); | 211 assert_equals(getComputedStyle(r10b).backgroundColor, "rgb(0, 128, 0)", "Bac
kground color b is green after class change"); |
| 212 }, "Sibling with descendant :-webkit-any containing compound selector"); | 212 }, "Sibling with descendant :-webkit-any containing compound selector"); |
| 213 | 213 |
| 214 </script> | 214 </script> |
| OLD | NEW |