4 <script src=
"../../../resources/js-test.js"></script>
7 <script src=
"parsing-test-utils.js"></script>
9 description('Testing parsing of the shape-outside property.');
11 // The test functions and globals used here are defined parsing-test-utils.js.
13 validShapeValues
.forEach(function(elt
, i
, a
) {
14 var value
= (elt
instanceof Array
) ? elt
[0] : elt
;
15 var expectedValue
= (elt
instanceof Array
) ? elt
[1] : elt
;
16 var computedValue
= (elt
instanceof Array
&& elt
.length
> 2) ? elt
[2] : expectedValue
;
17 testShapeSpecifiedProperty("shape-outside", value
, expectedValue
);
18 testShapeComputedProperty("shape-outside", value
, computedValue
);
21 testLocalURLShapeProperty("shape-outside", "url(\'image\')", "url(image)");
23 invalidShapeValues
.forEach(function(value
, i
, a
) {
24 testShapePropertyParsingFailure("shape-outside", value
, "none")
28 testNotInheritedShapeProperty
,
29 [// [property, parentValue, childValue, expectedValue]
30 ["-webkit-shape-outside", "none", "circle(30px at 10px 20px)", "parent: none, child: circle(30px at 10px 20px)"],
31 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "initial", "parent: circle(30px at 10px 20px), child: none"],
32 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "", "parent: circle(30px at 10px 20px), child: none"],
33 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "inherit", "parent: circle(30px at 10px 20px), child: circle(30px at 10px 20px)"],
34 ["shape-outside", "", "inherit", "parent: none, child: none"],
35 ["shape-outside", "none", "inherit", "parent: none, child: none"]]