tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

shape-outside-inset-009.html (3178B)


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