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('Test that CSS Shapes properties with the -webkit prefix alias the u
nprefixed properties.'); | 9 description('Test that CSS Shapes properties with the -webkit prefix alias the u
nprefixed properties.'); |
10 | 10 |
11 // This test is only necessary until the prefixed CSS properties have been remov
ed | 11 // This test is only necessary until the prefixed CSS properties have been remov
ed |
12 | 12 |
13 function getAliasCSSValue(alias, property, value) | 13 function getAliasCSSValue(alias, property, value) |
14 { | 14 { |
15 var element = document.createElement("div"); | 15 var element = document.createElement("div"); |
16 element.style.setProperty(alias, value); | 16 element.style.setProperty(alias, value); |
17 return element.style.getPropertyValue(property); | 17 return element.style.getPropertyValue(property); |
18 } | 18 } |
19 | 19 |
20 function testPropertyAlias(alias, property, value) | 20 function testPropertyAlias(alias, property, value) |
21 { | 21 { |
22 shouldBeEqualToString("getAliasCSSValue('" + alias + "','" + property + "','
" + value +"')", value); | 22 shouldBeEqualToString("getAliasCSSValue('" + alias + "','" + property + "','
" + value +"')", value); |
23 } | 23 } |
24 | 24 |
25 applyToEachArglist( | 25 applyToEachArglist( |
26 testPropertyAlias, | 26 testPropertyAlias, |
27 [// [alias, property, value] | 27 [// [alias, property, value] |
28 ["shape-inside", "shape-inside", "circle(0px at 0% 0%)"], | |
29 ["shape-outside", "shape-outside", "circle(0px at 0% 0%)"], | 28 ["shape-outside", "shape-outside", "circle(0px at 0% 0%)"], |
30 ["shape-margin", "shape-margin", "10px"], | 29 ["shape-margin", "shape-margin", "10px"], |
31 ["shape-padding", "shape-padding", "10px"], | 30 ["shape-padding", "shape-padding", "10px"], |
32 ["shape-image-threshold", "shape-image-threshold", "0.5"] | 31 ["shape-image-threshold", "shape-image-threshold", "0.5"] |
33 ] | 32 ] |
34 ); | 33 ); |
35 </script> | 34 </script> |
36 </body> | 35 </body> |
37 </html> | 36 </html> |
OLD | NEW |