Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / shapes / parsing / parsing-shape-margin.html
blobd461c99b43679b97270322e433dc281dce4d3ab6
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-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);
15 });
17 testShapeSpecifiedProperty("shape-margin", "0", "0px");
19 invalidShapeLengths.forEach(function(value, i, a) {
20 testShapeSpecifiedProperty("shape-margin", value, "");
21 });
23 applyToEachArglist(
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%)"]]
34 applyToEachArglist(
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"]]
42 </script>
43 </body>
44 </html>