| 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 .sibling + *, | 5 .t1 .sibling + *, |
| 6 .t2 .sibling ~ *, | 6 .t2 .sibling ~ *, |
| 7 .t3 .sibling + :hover, | 7 .t3 .sibling + :hover, |
| 8 .t4 + .sibling, | 8 .t4 + .sibling, |
| 9 .t5 + *, | 9 .t5 + *, |
| 10 .t6 ~ .sibling, | 10 .t6 ~ .sibling, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 t3.className = "t3"; | 111 t3.className = "t3"; |
| 112 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); | 112 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
| 113 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 113 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 114 }, "Adjacent with universal :hover selector"); | 114 }, "Adjacent with universal :hover selector"); |
| 115 | 115 |
| 116 test(function() { | 116 test(function() { |
| 117 assert_equals(getComputedStyle(r4).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 117 assert_equals(getComputedStyle(r4).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 118 | 118 |
| 119 t4.className = "t4"; | 119 t4.className = "t4"; |
| 120 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subt
ree style recalc"); | 120 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Subt
ree style recalc"); |
| 121 assert_equals(getComputedStyle(r4).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 121 assert_equals(getComputedStyle(r4).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 122 }, "Class change affecting selector for sibling class"); | 122 }, "Class change affecting selector for sibling class"); |
| 123 | 123 |
| 124 test(function() { | 124 test(function() { |
| 125 assert_equals(getComputedStyle(r5).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 125 assert_equals(getComputedStyle(r5).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 126 | 126 |
| 127 t5.className = "t5"; | 127 t5.className = "t5"; |
| 128 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subt
ree style recalc"); | 128 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Subt
ree style recalc"); |
| 129 assert_equals(getComputedStyle(r5).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 129 assert_equals(getComputedStyle(r5).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 130 }, "Class change affecting all sibling subtrees through a universal selector"); | 130 }, "Class change affecting all sibling subtrees through a universal selector"); |
| 131 | 131 |
| 132 test(function() { | 132 test(function() { |
| 133 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 133 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 134 | 134 |
| 135 t6.className = "t6"; | 135 t6.className = "t6"; |
| 136 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 6, "Subt
ree style recalc"); | 136 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Subt
ree style recalc"); |
| 137 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 137 assert_equals(getComputedStyle(r6).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 138 }, "Class change affecting all sibling subtrees through an indirect adjacent com
binator"); | 138 }, "Class change affecting all sibling subtrees through an indirect adjacent com
binator"); |
| 139 | 139 |
| 140 test(function() { | 140 test(function() { |
| 141 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 141 assert_equals(getComputedStyle(r7).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 142 | 142 |
| 143 t7.className = "t7"; | 143 t7.className = "t7"; |
| 144 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 8, "Subt
ree style recalc"); | 144 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt
ree style recalc"); |
| 145 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 145 assert_equals(getComputedStyle(r7).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 146 }, "Class change affecting sibling descendants through a universal selector"); | 146 }, "Class change affecting sibling descendants through a universal selector"); |
| 147 | 147 |
| 148 test(function() { | 148 test(function() { |
| 149 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 149 assert_equals(getComputedStyle(r8).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 150 | 150 |
| 151 t8.className = "t8"; | 151 t8.className = "t8"; |
| 152 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); | 152 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt
ree style recalc"); |
| 153 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 153 assert_equals(getComputedStyle(r8).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 154 }, "Class change affecting universal descendants of webkit-any sibling"); | 154 }, "Class change affecting universal descendants of webkit-any sibling"); |
| 155 | 155 |
| 156 </script> | 156 </script> |
| OLD | NEW |