shape-outside-inset-009

Shape Outside Inset round args - calc() values

WeasyPrint

This browser

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

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3         <title>Shape Outside Inset round 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-inset" 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 inset's radial component 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 fullInset = '10px 10px 10px 10px';
20             var serializedInset = "10px";
21 
22             var inset_round_calc_tests = [];
23             ParsingUtils.calcTestValues.forEach(function(value) {
24                 testCase = ['inset('+ fullInset +' round '+ value[0] +')',
25                             'inset('+ serializedInset +' round '+ value[1] +')'];
26                 // array check
27                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
28                     testCase.push([
29                                     'inset('+ serializedInset +' round '+ value[2][0] +')',
30                                     'inset('+ serializedInset +' round '+ value[2][1] +')'
31                                  ]);
32                 } else {
33                     testCase.push('inset('+ serializedInset +' round '+ value[2] +')');
34                 }
35                 inset_round_calc_tests.push(testCase);
36             });
37             ParsingUtils.calcTestValues.forEach(function(value) {
38                 testCase = ['inset('+ fullInset +' round '+ value[0] +' '+  value[0] +')',
39                             'inset('+ serializedInset +' round '+ value[1] +')'];
40                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
41                     testCase.push([
42                                     'inset('+ serializedInset +' round '+ value[2][0] +')',
43                                     'inset('+ serializedInset +' round '+ value[2][1] +')'
44                                  ]);
45                 } else {
46                     testCase.push('inset('+ serializedInset +' round '+ value[2] +')');
47                 }
48                 inset_round_calc_tests.push(testCase);
49             });
50             generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcTests(inset_round_calc_tests, 'inline'));
51             generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCalcTests(inset_round_calc_tests, 'computed'));
52         </script>
53     
54 
55 </body></html>