4 <script src=
"../../../resources/js-test.js"></script>
7 <script src=
"parsing-test-utils.js"></script>
9 description('Test parsing of the CSS shape-margin property.');
11 // The test functions and globals used here are defined parsing-test-utils.js.
13 validShapeLengths
.forEach(function(value
, i
, a
) {
14 testShapeSpecifiedProperty("shape-margin", value
, value
);
17 testShapeSpecifiedProperty("shape-margin", "0", "0px");
19 invalidShapeLengths
.forEach(function(value
, i
, a
) {
20 testShapeSpecifiedProperty("shape-margin", value
, "");
24 testShapeComputedProperty
,
25 [// [property, value, expectedValue]
26 ["shape-margin", "0", "0px"],
27 ["shape-margin", "1px", "1px"],
28 ["shape-margin", "-5em", "0px"],
29 ["shape-margin", "identifier", "0px"],
30 ["shape-margin", "\'string\'", "0px"],
31 ["shape-margin", "calc(25%*3 - 10in)", "calc(-960px + 75%)"]]
35 testNotInheritedShapeChildProperty
,
36 [// [property, parentValue, childValue, expectedChildValue]
37 ["shape-margin", "0", "0", "0px"],
38 ["shape-margin", "0", "1px", "1px"],
39 ["shape-margin", "1px", "-1em", "0px"],
40 ["shape-margin", "2px", "1px", "1px"]]