| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 t1.className = ""; | 80 t1.className = ""; |
| 81 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Sing
le element style recalc"); | 81 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Sing
le element style recalc"); |
| 82 assert_equals(getComputedStyle(t1).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 82 assert_equals(getComputedStyle(t1).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 83 }, "Negated class without combinators"); | 83 }, "Negated class without combinators"); |
| 84 | 84 |
| 85 test(function() { | 85 test(function() { |
| 86 assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 86 assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 87 | 87 |
| 88 t2.className = ""; | 88 t2.className = ""; |
| 89 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Reca
lc changed element and #r2"); | 89 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Reca
lc changed element and #r2"); |
| 90 assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 90 assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 91 }, "Id descendant of negated class"); | 91 }, "Id descendant of negated class"); |
| 92 | 92 |
| 93 test(function() { | 93 test(function() { |
| 94 assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 94 assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 95 | 95 |
| 96 t3.className = ""; | 96 t3.className = ""; |
| 97 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); | 97 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
| 98 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 98 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 99 }, "Negated class descendant of negated class"); | 99 }, "Negated class descendant of negated class"); |
| 100 | 100 |
| 101 test(function() { | 101 test(function() { |
| 102 assert_equals(getComputedStyle(r4).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 102 assert_equals(getComputedStyle(r4).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 103 | 103 |
| 104 t4.className = "t4"; | 104 t4.className = "t4"; |
| 105 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); | 105 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subt
ree style recalc"); |
| 106 assert_equals(getComputedStyle(r4).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 106 assert_equals(getComputedStyle(r4).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 107 }, "Negated class descendant of class"); | 107 }, "Negated class descendant of class"); |
| 108 | 108 |
| 109 test(function() { | 109 test(function() { |
| 110 assert_equals(getComputedStyle(r5).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 110 assert_equals(getComputedStyle(r5).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 111 | 111 |
| 112 t5.className = ""; | 112 t5.className = ""; |
| 113 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Reca
lc changed element and #r5"); | 113 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "Reca
lc changed element and #r5"); |
| 114 assert_equals(getComputedStyle(r5).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); | 114 assert_equals(getComputedStyle(r5).backgroundColor, "rgb(0, 128, 0)", "Backg
round color is green after class change"); |
| 115 }, "Id descendant of negated class in :-webkit-any"); | 115 }, "Id descendant of negated class in :-webkit-any"); |
| 116 | 116 |
| 117 test(function() { | 117 test(function() { |
| 118 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); | 118 assert_equals(getComputedStyle(r6).backgroundColor, "rgba(0, 0, 0, 0)", "Bac
kground color should initially be transparent"); |
| 119 | 119 |
| 120 t6.className = "t6"; | 120 t6.className = "t6"; |
| 121 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "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(), 4, "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(), 6, "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 |