| 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 <div id="testContainer"> | 4 <div id="testContainer"> |
| 5 <div id="outer"> | 5 <div id="outer"> |
| 6 <div id="inner"> | 6 <div id="inner"> |
| 7 <div id="innermost"></div> | 7 <div id="innermost"></div> |
| 8 </div> | 8 </div> |
| 9 </div> | 9 </div> |
| 10 </div> | 10 </div> |
| 11 <script> | 11 <script> |
| 12 | 12 |
| 13 // TODO(napper): Generate this table from CSSProperties.in. | 13 // TODO(napper): Generate this table from CSSProperties.in. |
| 14 var independent_properties = [ | 14 var independent_properties = [ |
| 15 // [Property name, [list of valid keywords]]. Each keyword is tested in cons
ecutive pairs. | 15 // [Property name, [list of valid keywords]]. Each keyword is tested in cons
ecutive pairs. |
| 16 ["pointerEvents", ["none", "auto", "stroke", "fill", "painted", "visible", "
visibleStroke", "visibleFill", "visiblePainted", "bounding-box", "all"]], | 16 ["pointerEvents", ["none", "auto", "stroke", "fill", "painted", "visible", "
visibleStroke", "visibleFill", "visiblePainted", "bounding-box", "all"]], |
| 17 ["visibility", ["visible", "hidden", "collapse"]], | 17 ["visibility", ["visible", "hidden", "collapse"]], |
| 18 ["whiteSpace", ["normal", "pre", "pre-wrap", "pre-line", "nowrap"]], | 18 ["whiteSpace", ["normal", "pre", "pre-wrap", "pre-line", "nowrap"]], |
| 19 ["borderCollapse", ["separate", "collapse"]], | 19 ["borderCollapse", ["separate", "collapse"]], |
| 20 ["emptyCells", ["show", "hide"]], | 20 ["emptyCells", ["show", "hide"]], |
| 21 ["captionSide", ["top", "bottom"]], | 21 ["captionSide", ["top", "bottom"]], |
| 22 ["listStylePosition", ["outside", "inside"]], | 22 ["listStylePosition", ["outside", "inside"]], |
| 23 ["webkitBoxDirection", ["normal", "reverse"]], | 23 ["webkitBoxDirection", ["normal", "reverse"]], |
| 24 ["webkitPrintColorAdjust", ["economy", "exact"]], | 24 ["webkitPrintColorAdjust", ["economy", "exact"]], |
| 25 ["textTransform", ["capitalize", "uppercase", "lowercase", "none"]], | 25 ["textTransform", ["capitalize", "uppercase", "lowercase", "none"]], |
| 26 ["webkitRtlOrdering", ["logical", "visual"]], | 26 ["webkitRtlOrdering", ["logical", "visual"]], |
| 27 ["textAlign", ["start", "left"]], | |
| 28 ]; | 27 ]; |
| 29 | 28 |
| 30 independent_properties.forEach(function(test_data) | 29 independent_properties.forEach(function(test_data) |
| 31 { | 30 { |
| 32 var propertyName = test_data[0]; | 31 var propertyName = test_data[0]; |
| 33 var keywords = test_data[1]; | 32 var keywords = test_data[1]; |
| 34 var num_keywords = keywords.length; | 33 var num_keywords = keywords.length; |
| 35 // Tests style change propagation for each keyword, verifying there is only
a single | 34 // Tests style change propagation for each keyword, verifying there is only
a single |
| 36 // style recalc. | 35 // style recalc. |
| 37 for (i = 0; i < num_keywords; i++) { | 36 for (i = 0; i < num_keywords; i++) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 assert_equals(getComputedStyle(inner)[propertyName], value2); | 92 assert_equals(getComputedStyle(inner)[propertyName], value2); |
| 94 assert_equals(getComputedStyle(innermost)[propertyName], value2); | 93 assert_equals(getComputedStyle(innermost)[propertyName], value2); |
| 95 outer.offsetTop; // Force recalc. | 94 outer.offsetTop; // Force recalc. |
| 96 | 95 |
| 97 // Clear for next test. | 96 // Clear for next test. |
| 98 outer.remove(); | 97 outer.remove(); |
| 99 }, "Changing " + propertyName + ", an independent inherited property, pr
opagates correctly with a single style recalc."); | 98 }, "Changing " + propertyName + ", an independent inherited property, pr
opagates correctly with a single style recalc."); |
| 100 } | 99 } |
| 101 }) | 100 }) |
| 102 </script> | 101 </script> |
| OLD | NEW |