OLD | NEW |
1 description('Testing parsing of the -webkit-shape-inside property.'); | 1 description('Testing parsing of the -webkit-shape-inside property.'); |
2 | 2 |
3 if (window.internals) | |
4 window.internals.settings.setCSSExclusionsEnabled(true); | |
5 | |
6 // The test functions and globals used here are defined parsing-test-utils.js. | 3 // The test functions and globals used here are defined parsing-test-utils.js. |
7 | 4 |
8 validShapeValues.concat("outside-shape").forEach(function(elt, i, a) { | 5 validShapeValues.concat("outside-shape").forEach(function(elt, i, a) { |
9 var value = (elt instanceof Array) ? elt[0] : elt; | 6 var value = (elt instanceof Array) ? elt[0] : elt; |
10 var expectedValue = (elt instanceof Array) ? elt[1] : elt; | 7 var expectedValue = (elt instanceof Array) ? elt[1] : elt; |
11 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expe
ctedValue; | 8 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expe
ctedValue; |
12 testShapeSpecifiedProperty("-webkit-shape-inside", value, expectedValue); | 9 testShapeSpecifiedProperty("-webkit-shape-inside", value, expectedValue); |
13 testShapeComputedProperty("-webkit-shape-inside", value, computedValue); | 10 testShapeComputedProperty("-webkit-shape-inside", value, computedValue); |
14 }); | 11 }); |
15 | 12 |
16 testLocalURLShapeProperty("-webkit-shape-inside", "url(\'image\')", "url(image)"
); | 13 testLocalURLShapeProperty("-webkit-shape-inside", "url(\'image\')", "url(image)"
); |
17 | 14 |
18 invalidShapeValues.forEach(function(value, i, a) { | 15 invalidShapeValues.forEach(function(value, i, a) { |
19 testShapePropertyParsingFailure("-webkit-shape-inside", value, "outside-shap
e") | 16 testShapePropertyParsingFailure("-webkit-shape-inside", value, "outside-shap
e") |
20 }); | 17 }); |
21 | 18 |
22 applyToEachArglist( | 19 applyToEachArglist( |
23 testNotInheritedShapeProperty, | 20 testNotInheritedShapeProperty, |
24 [// [property, parentValue, childValue, expectedValue] | 21 [// [property, parentValue, childValue, expectedValue] |
25 ["-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)", "pare
nt: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], | 22 ["-webkit-shape-inside", "auto", "rectangle(10px, 20px, 30px, 40px)", "pare
nt: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], |
26 ["-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px
)", "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"]
, | 23 ["-webkit-shape-inside", "outside-shape", "rectangle(10px, 20px, 30px, 40px
)", "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"]
, |
27 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial", "p
arent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"], | 24 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "initial", "p
arent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"], |
28 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "", "parent:
rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"], | 25 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "", "parent:
rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: outside-shape"], |
29 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "p
arent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px,
30px, 40px, 0px, 0px)"], | 26 ["-webkit-shape-inside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "p
arent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px,
30px, 40px, 0px, 0px)"], |
30 ["-webkit-shape-inside", "", "inherit", "parent: outside-shape, child: outs
ide-shape"], | 27 ["-webkit-shape-inside", "", "inherit", "parent: outside-shape, child: outs
ide-shape"], |
31 ["-webkit-shape-inside", "auto", "inherit", "parent: auto, child: auto"]] | 28 ["-webkit-shape-inside", "auto", "inherit", "parent: auto, child: auto"]] |
32 ); | 29 ); |
OLD | NEW |