OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <style> | 3 <style> |
4 * { font-size: 16px; } | 4 * { font-size: 16px; } |
5 div { font-size: 8px; } | 5 div { font-size: 8px; } |
6 </style> | 6 </style> |
7 <body> | 7 <body> |
8 <script src="../../resources/js-test.js"></script> | 8 <script src="../../resources/js-test.js"></script> |
9 <script> | 9 <script> |
10 description('Test that clip-path shapes accept different length units'); | 10 description('Test that clip-path shapes accept different length units'); |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 function testInner(property, value, expected) { | 31 function testInner(property, value, expected) { |
32 if (expected === null) | 32 if (expected === null) |
33 shouldBeNull('innerStyle("' + property + '", "' + value + '")'); | 33 shouldBeNull('innerStyle("' + property + '", "' + value + '")'); |
34 else | 34 else |
35 shouldBeEqualToString('innerStyle("' + property + '", "' + value + '")',
expected); | 35 shouldBeEqualToString('innerStyle("' + property + '", "' + value + '")',
expected); |
36 } | 36 } |
37 | 37 |
38 function negativeTest(property, value) { | 38 function negativeTest(property, value) { |
39 testInner(property, value, null); | 39 testInner(property, value, ""); |
40 testComputed(property, value, 'none'); | 40 testComputed(property, value, 'none'); |
41 } | 41 } |
42 | 42 |
43 // absolute lengths - number serialization, units | 43 // absolute lengths - number serialization, units |
44 testInner("-webkit-clip-path", "circle(0 at 0 0)", "circle(0px at 0% 0%)"); | 44 testInner("-webkit-clip-path", "circle(0 at 0 0)", "circle(0px at 0% 0%)"); |
45 testInner("-webkit-clip-path", "circle(1px at -1px +1px)", "circle(1px at -1px 1
px)"); | 45 testInner("-webkit-clip-path", "circle(1px at -1px +1px)", "circle(1px at -1px 1
px)"); |
46 testInner("-webkit-clip-path", "circle(1.5px at -1.5px +1.5px)", "circle(1.5px a
t -1.5px 1.5px)"); | 46 testInner("-webkit-clip-path", "circle(1.5px at -1.5px +1.5px)", "circle(1.5px a
t -1.5px 1.5px)"); |
47 testInner("-webkit-clip-path", "circle(.5px at -.5px +.5px)", "circle(0.5px at -
0.5px 0.5px)"); | 47 testInner("-webkit-clip-path", "circle(.5px at -.5px +.5px)", "circle(0.5px at -
0.5px 0.5px)"); |
48 | 48 |
49 // font-relative lengths - number serialization, units, resolution | 49 // font-relative lengths - number serialization, units, resolution |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 negativeTest("-webkit-clip-path", "polygon(0, 0)"); | 90 negativeTest("-webkit-clip-path", "polygon(0, 0)"); |
91 negativeTest("-webkit-clip-path", "polygon(0 0, 0)"); | 91 negativeTest("-webkit-clip-path", "polygon(0 0, 0)"); |
92 negativeTest("-webkit-clip-path", "polygon(0)"); | 92 negativeTest("-webkit-clip-path", "polygon(0)"); |
93 negativeTest("-webkit-clip-path", "polygon()"); | 93 negativeTest("-webkit-clip-path", "polygon()"); |
94 negativeTest("-webkit-clip-path", "polygon(evenodd)"); | 94 negativeTest("-webkit-clip-path", "polygon(evenodd)"); |
95 negativeTest("-webkit-clip-path", "polygon(nonzero)"); | 95 negativeTest("-webkit-clip-path", "polygon(nonzero)"); |
96 | 96 |
97 </script> | 97 </script> |
98 </body> | 98 </body> |
99 </html> | 99 </html> |
OLD | NEW |