| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script src="parsing-test-utils.js"></script> | 7 <script src="parsing-test-utils.js"></script> |
| 8 <script> | 8 <script> |
| 9 description('Test parsing of the CSS shape-margin property.'); | 9 description('Test parsing of the CSS shape-margin property.'); |
| 10 | 10 |
| 11 // The test functions and globals used here are defined parsing-test-utils.js. | 11 // The test functions and globals used here are defined parsing-test-utils.js. |
| 12 | 12 |
| 13 validShapeLengths.forEach(function(value, i, a) { | 13 validShapeLengths.forEach(function(value, i, a) { |
| 14 testShapeSpecifiedProperty("shape-margin", value, value); | 14 testShapeSpecifiedProperty("shape-margin", value, value); |
| 15 }); | 15 }); |
| 16 | 16 |
| 17 testShapeSpecifiedProperty("shape-margin", "0", "0px"); | 17 testShapeSpecifiedProperty("shape-margin", "0", "0px"); |
| 18 | 18 |
| 19 invalidShapeLengths.forEach(function(value, i, a) { | 19 invalidShapeLengths.forEach(function(value, i, a) { |
| 20 testShapeSpecifiedProperty("shape-margin", value, ""); | 20 testShapeSpecifiedProperty("shape-margin", value, ""); |
| 21 }); | 21 }); |
| 22 | 22 |
| 23 applyToEachArglist( | 23 applyToEachArglist( |
| 24 testShapeComputedProperty, | 24 testShapeComputedProperty, |
| 25 [// [property, value, expectedValue] | 25 [// [property, value, expectedValue] |
| 26 ["shape-margin", "0", "0px"], | 26 ["shape-margin", "0", "0px"], |
| 27 ["shape-margin", "1px", "1px"], | 27 ["shape-margin", "1px", "1px"], |
| 28 ["shape-margin", "-5em", "0px"], | 28 ["shape-margin", "-5em", "0px"], |
| 29 ["shape-margin", "identifier", "0px"], | 29 ["shape-margin", "identifier", "0px"], |
| 30 ["shape-margin", "\'string\'", "0px"]] | 30 ["shape-margin", "\'string\'", "0px"], |
| 31 ["shape-margin", "calc(25%*3 - 10in)", "calc(-960px + 75%)"]] |
| 31 ); | 32 ); |
| 32 | 33 |
| 33 applyToEachArglist( | 34 applyToEachArglist( |
| 34 testNotInheritedShapeChildProperty, | 35 testNotInheritedShapeChildProperty, |
| 35 [// [property, parentValue, childValue, expectedChildValue] | 36 [// [property, parentValue, childValue, expectedChildValue] |
| 36 ["shape-margin", "0", "0", "0px"], | 37 ["shape-margin", "0", "0", "0px"], |
| 37 ["shape-margin", "0", "1px", "1px"], | 38 ["shape-margin", "0", "1px", "1px"], |
| 38 ["shape-margin", "1px", "-1em", "0px"], | 39 ["shape-margin", "1px", "-1em", "0px"], |
| 39 ["shape-margin", "2px", "1px", "1px"]] | 40 ["shape-margin", "2px", "1px", "1px"]] |
| 40 ); | 41 ); |
| 41 </script> | 42 </script> |
| 42 </body> | 43 </body> |
| 43 </html> | 44 </html> |
| OLD | NEW |