shape-outside-ellipse-010.html (3139B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Shape Outside Ellipse 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-ellipse"> 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-notation"> 11 <meta name="assert" content="An ellipse's arguments may be in calc() values."> 12 <meta name="flags" content="ahem dom"> 13 <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> 14 <script src="/resources/testharness.js"></script> 15 <script src="/resources/testharnessreport.js"></script> 16 <script src="support/parsing-utils.js"></script> 17 </head> 18 <body> 19 <div id="log"></div> 20 <script type="text/javascript"> 21 var ellipse_calc_tests = []; 22 var defaultPosition = ' at 50% 50%'; 23 ParsingUtils.calcTestValues.forEach(function(value) { 24 testCase = ['ellipse(farthest-side '+ value[0] + defaultPosition + ')', 25 'ellipse(farthest-side '+ value[1] + defaultPosition +')']; 26 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) { 27 testCase.push([ 28 'ellipse(farthest-side '+ value[2][0] + defaultPosition +')', 29 'ellipse(farthest-side '+ value[2][1] + defaultPosition +')' 30 ]); 31 } else { 32 testCase.push('ellipse(farthest-side '+ value[2] + defaultPosition +')'); 33 } 34 ellipse_calc_tests.push(testCase); 35 }); 36 ParsingUtils.calcTestValues.forEach(function(value) { 37 testCase = ['ellipse('+ value[0] +' '+ value[0] + defaultPosition + ')', 38 'ellipse('+ value[1] +' '+ value[1] + defaultPosition +')']; 39 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) { 40 testCase.push([ 41 'ellipse('+ value[2][0] +' '+ value[2][0] + defaultPosition +')', 42 'ellipse('+ value[2][1] +' '+ value[2][1] + defaultPosition +')' 43 ]); 44 } else { 45 testCase.push('ellipse('+ value[2] +' '+ value[2] + defaultPosition +')'); 46 } 47 48 ellipse_calc_tests.push(testCase); 49 }); 50 generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcTests(ellipse_calc_tests, 'value')); 51 generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCalcTests(ellipse_calc_tests, 'computed')); 52 </script> 53 </body> 54 </html>