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