shape-outside-ellipse-010

Shape Outside Ellipse 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 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 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_calc_tests = [];
20             var defaultPosition = ' at 50% 50%';
21             ParsingUtils.calcTestValues.forEach(function(value) {
22                 testCase = ['ellipse('+ value[0] +')',
23                             'ellipse('+ value[1] + defaultPosition +')'];
24                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
25                     testCase.push([
26                                     'ellipse('+ value[2][0]  + defaultPosition +')',
27                                     'ellipse('+ value[2][1]  + defaultPosition +')',
28                                   ]);
29                 } else {
30                     testCase.push('ellipse('+ value[2] + defaultPosition +')');
31                 }
32                 ellipse_calc_tests.push(testCase);
33             });
34             ParsingUtils.calcTestValues.forEach(function(value) {
35                 testCase = ['ellipse(farthest-side '+ value[0] +')',
36                             'ellipse(farthest-side '+ value[1] + defaultPosition +')'];
37                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
38                     testCase.push([
39                                     'ellipse(farthest-side '+ value[2][0] + defaultPosition +')',
40                                     'ellipse(farthest-side '+ value[2][1] + defaultPosition +')'
41                                  ]);
42                 } else {
43                      testCase.push('ellipse(farthest-side '+ value[2] + defaultPosition +')');
44                 }
45                 ellipse_calc_tests.push(testCase);
46             });
47             ParsingUtils.calcTestValues.forEach(function(value) {
48                 testCase = ['ellipse('+ value[0] +' '+ value[0] +')',
49                             'ellipse('+ value[1] +' '+ value[1] + defaultPosition +')'];
50                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
51                     testCase.push([
52                                     'ellipse('+ value[2][0] +' '+ value[2][0]  + defaultPosition +')',
53                                     'ellipse('+ value[2][1] +' '+ value[2][1]  + defaultPosition +')'
54                                   ]);
55                 } else {
56                     testCase.push('ellipse('+ value[2] +' '+ value[2]  + defaultPosition +')');
57                 }
58 
59                 ellipse_calc_tests.push(testCase);
60             });
61             generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcTests(ellipse_calc_tests, 'value'));
62             generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCalcTests(ellipse_calc_tests, 'computed'));
63         </script>
64     
65 
66 </body></html>