shape-outside-inset-008

Shape Outside Inset Args - calc() values

WeasyPrint

This browser

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

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3         <title>Shape Outside Inset 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 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 inset_calc_tests = [];
20             ParsingUtils.calcTestValues.forEach(function(value) {
21                 testCase = ['inset('+ value[0] +')',
22                             'inset('+ value[1] +')'];
23                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
24                     testCase.push([ 'inset('+ value[2][0] +')', 'inset('+ value[2][1] +')' ]);
25                 } else {
26                     testCase.push('inset('+ value[2] +')');
27                 }
28                 inset_calc_tests.push(testCase);
29             });
30             ParsingUtils.calcTestValues.forEach(function(value) {
31                 testCase = ['inset('+ value[0] +' '+ value[0] +')',
32                             'inset('+ value[1] +')'];
33                 if(Object.prototype.toString.call( value[2] ) === '[object Array]' && value[2].length == 2) {
34                     testCase.push([ 'inset('+ value[2][0] +')', 'inset('+ value[2][1] +')' ]);
35                 } else {
36                     testCase.push('inset('+ value[2] +')');
37                 }
38                 inset_calc_tests.push(testCase);
39             });
40             generate_tests(ParsingUtils.testInlineStyle, ParsingUtils.buildCalcTests(inset_calc_tests, 'value'));
41             generate_tests(ParsingUtils.testComputedStyle, ParsingUtils.buildCalcTests(inset_calc_tests, 'computed'));
42         </script>
43     
44 
45 </body></html>