OLD | NEW |
1 description('Testing parsing of the -webkit-shape-outside property.'); | 1 description('Testing parsing of the -webkit-shape-outside 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.forEach(function(elt, i, a) { | 5 validShapeValues.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-outside", value, expectedValue); | 9 testShapeSpecifiedProperty("-webkit-shape-outside", value, expectedValue); |
13 testShapeComputedProperty("-webkit-shape-outside", value, computedValue); | 10 testShapeComputedProperty("-webkit-shape-outside", value, computedValue); |
14 }); | 11 }); |
15 | 12 |
16 testLocalURLShapeProperty("-webkit-shape-outside", "url(\'image\')", "url(image)
"); | 13 testLocalURLShapeProperty("-webkit-shape-outside", "url(\'image\')", "url(image)
"); |
17 | 14 |
18 invalidShapeValues.forEach(function(value, i, a) { | 15 invalidShapeValues.forEach(function(value, i, a) { |
19 testShapePropertyParsingFailure("-webkit-shape-outside", value, "auto") | 16 testShapePropertyParsingFailure("-webkit-shape-outside", value, "auto") |
20 }); | 17 }); |
21 | 18 |
22 testShapePropertyParsingFailure("-webkit-shape-outside", "outside-shape", "auto"
); | 19 testShapePropertyParsingFailure("-webkit-shape-outside", "outside-shape", "auto"
); |
23 | 20 |
24 applyToEachArglist( | 21 applyToEachArglist( |
25 testNotInheritedShapeProperty, | 22 testNotInheritedShapeProperty, |
26 [// [property, parentValue, childValue, expectedValue] | 23 [// [property, parentValue, childValue, expectedValue] |
27 ["-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)", "par
ent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], | 24 ["-webkit-shape-outside", "auto", "rectangle(10px, 20px, 30px, 40px)", "par
ent: auto, child: rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], |
28 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial", "
parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"], | 25 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "initial", "
parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"], |
29 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "", "parent:
rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"], | 26 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "", "parent:
rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: auto"], |
30 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "
parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px
, 30px, 40px, 0px, 0px)"], | 27 ["-webkit-shape-outside", "rectangle(10px, 20px, 30px, 40px)", "inherit", "
parent: rectangle(10px, 20px, 30px, 40px, 0px, 0px), child: rectangle(10px, 20px
, 30px, 40px, 0px, 0px)"], |
31 ["-webkit-shape-outside", "", "inherit", "parent: auto, child: auto"], | 28 ["-webkit-shape-outside", "", "inherit", "parent: auto, child: auto"], |
32 ["-webkit-shape-outside", "auto", "inherit", "parent: auto, child: auto"]] | 29 ["-webkit-shape-outside", "auto", "inherit", "parent: auto, child: auto"]] |
33 ); | 30 ); |
OLD | NEW |