shape-outside-ellipse-011

Shape Outside Ellipse position args - calc() values

WeasyPrint

This browser

Flags
dom, script
Assertion
An ellipse's arguments may be in calc() values.

Source

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