OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Shape Outside Ellipse position args - calc() values</title> |
| 5 <link rel="author" title="Adobe" href="http://html.adobe.com/"> |
| 6 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> |
| 7 <link rel="reviewer" title="Alan Stearns" href="mailto:stearns@adobe.com
"> <!-- 2014-03-04 --> |
| 8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-ellips
e"> |
| 9 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-
property"> |
| 10 <link rel="help" href="http://www.w3.org/TR/css3-values/#calc"> |
| 11 <meta name="assert" content="An ellipse's <position> arguments may be in
calc() values."> |
| 12 <meta name="flags" content="dom"> |
| 13 <script src="../../../../../resources/testharness.js"></script> |
| 14 <script src="../../../../../resources/testharnessreport.js"></script> |
| 15 <script src="support/parsing-utils.js"></script> |
| 16 </head> |
| 17 <body> |
| 18 <div id="log"></div> |
| 19 <script type="text/javascript"> |
| 20 var ellipse_position_calc_tests = []; |
| 21 ParsingUtils.calcTestValues.forEach(function(value) { |
| 22 testCase = ['ellipse(at '+ value[0] +' 50%)', |
| 23 'ellipse(at '+ value[1] +' 50%)']; |
| 24 if(Object.prototype.toString.call( value[2] ) === '[object Array
]' && value[2].length == 2) { |
| 25 testCase.push([ |
| 26 'ellipse(at '+ value[2][0] +' 50%)', |
| 27 'ellipse(at '+ value[2][1] +' 50%)' |
| 28 ]); |
| 29 } else { |
| 30 testCase.push('ellipse(at '+ value[2] +' 50%)'); |
| 31 } |
| 32 ellipse_position_calc_tests.push(testCase); |
| 33 }); |
| 34 ParsingUtils.calcTestValues.forEach(function(value) { |
| 35 testCase = ['ellipse(farthest-side at '+ value[0] +' 50%)', |
| 36 'ellipse(farthest-side at '+ value[1] +' 50%)']; |
| 37 if(Object.prototype.toString.call( value[2] ) === '[object Array
]' && value[2].length == 2) { |
| 38 testCase.push([ |
| 39 'ellipse(farthest-side at '+ value[2][0] +'
50%)', |
| 40 'ellipse(farthest-side at '+ value[2][1] +'
50%)' |
| 41 ]); |
| 42 } else { |
| 43 testCase.push('ellipse(farthest-side at '+ value[2] +' 50%)'
); |
| 44 } |
| 45 ellipse_position_calc_tests.push(testCase); |
| 46 }); |
| 47 ParsingUtils.calcTestValues.forEach(function(value) { |
| 48 testCase = ['ellipse(closest-side farthest-side at '+ value[0] +
' '+ value[0] +')', |
| 49 'ellipse(closest-side farthest-side at '+ value[1] +
' '+ value[1] +')']; |
| 50 if(Object.prototype.toString.call( value[2] ) === '[object Array
]' && value[2].length == 2) { |
| 51 testCase.push([ |
| 52 'ellipse(closest-side farthest-side at '+ va
lue[2][0] +' '+ value[2][0] +')', |
| 53 'ellipse(closest-side farthest-side at '+ va
lue[2][1] +' '+ value[2][1] +')' |
| 54 ]); |
| 55 } else { |
| 56 testCase.push('ellipse(closest-side farthest-side at '+ valu
e[2] +' '+ value[2] +')'); |
| 57 } |
| 58 ellipse_position_calc_tests.push(testCase); |
| 59 }); |
| 60 generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcT
ests(ellipse_position_calc_tests, 'inline')); |
| 61 generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCal
cTests(ellipse_position_calc_tests, 'computed')); |
| 62 </script> |
| 63 </body> |
| 64 </html> |
OLD | NEW |