OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script src="parsing-test-utils.js"></script> | 7 <script src="parsing-test-utils.js"></script> |
8 <script> | 8 <script> |
9 description('Testing parsing of the shape-outside property.'); | 9 description('Testing parsing of the shape-outside property.'); |
10 | 10 |
11 // The test functions and globals used here are defined parsing-test-utils.js. | 11 // The test functions and globals used here are defined parsing-test-utils.js. |
12 | 12 |
13 validShapeValues.forEach(function(elt, i, a) { | 13 validShapeValues.forEach(function(elt, i, a) { |
14 var value = (elt instanceof Array) ? elt[0] : elt; | 14 var value = (elt instanceof Array) ? elt[0] : elt; |
15 var expectedValue = (elt instanceof Array) ? elt[1] : elt; | 15 var expectedValue = (elt instanceof Array) ? elt[1] : elt; |
16 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expe
ctedValue; | 16 var computedValue = (elt instanceof Array && elt.length > 2) ? elt[2] : expe
ctedValue; |
17 testShapeSpecifiedProperty("shape-outside", value, expectedValue); | 17 testShapeSpecifiedProperty("shape-outside", value, expectedValue); |
18 testShapeComputedProperty("shape-outside", value, computedValue); | 18 testShapeComputedProperty("shape-outside", value, computedValue); |
19 }); | 19 }); |
20 | 20 |
21 testLocalURLShapeProperty("shape-outside", "url(\'image\')", "url(image)"); | 21 testLocalURLShapeProperty("shape-outside", "url(\'image\')", "url(image)"); |
22 | 22 |
23 invalidShapeValues.forEach(function(value, i, a) { | 23 invalidShapeValues.forEach(function(value, i, a) { |
24 testShapePropertyParsingFailure("shape-outside", value, "none") | 24 testShapePropertyParsingFailure("shape-outside", value, "none") |
25 }); | 25 }); |
26 | 26 |
27 testShapePropertyParsingFailure("shape-outside", "outside-shape", "none"); | |
28 | |
29 applyToEachArglist( | 27 applyToEachArglist( |
30 testNotInheritedShapeProperty, | 28 testNotInheritedShapeProperty, |
31 [// [property, parentValue, childValue, expectedValue] | 29 [// [property, parentValue, childValue, expectedValue] |
32 ["-webkit-shape-outside", "none", "circle(30px at 10px 20px)", "parent: non
e, child: circle(30px at 10px 20px)"], | 30 ["-webkit-shape-outside", "none", "circle(30px at 10px 20px)", "parent: non
e, child: circle(30px at 10px 20px)"], |
33 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "initial", "parent:
circle(30px at 10px 20px), child: none"], | 31 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "initial", "parent:
circle(30px at 10px 20px), child: none"], |
34 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "", "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"], |
35 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "inherit", "parent:
circle(30px at 10px 20px), child: circle(30px at 10px 20px)"], | 33 ["-webkit-shape-outside", "circle(30px at 10px 20px)", "inherit", "parent:
circle(30px at 10px 20px), child: circle(30px at 10px 20px)"], |
36 ["shape-outside", "", "inherit", "parent: none, child: none"], | 34 ["shape-outside", "", "inherit", "parent: none, child: none"], |
37 ["shape-outside", "none", "inherit", "parent: none, child: none"]] | 35 ["shape-outside", "none", "inherit", "parent: none, child: none"]] |
38 ); | 36 ); |
39 </script> | 37 </script> |
40 </body> | 38 </body> |
41 </html> | 39 </html> |
OLD | NEW |