tor-browser

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

shape-margin-001.html (2007B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4        <title>Shape Margin Valid Values - Length Units</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="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property">
      8        <meta name="assert" content="shape-margin values may be in any length unit">
      9        <meta name="flags" content="ahem dom">
     10        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
     11        <script src="/resources/testharness.js"></script>
     12        <script src="/resources/testharnessreport.js"></script>
     13        <script src="support/parsing-utils.js"></script>
     14        <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     15    </head>
     16    <body>
     17        <div id="log"></div>
     18        <script type="text/javascript">
     19        setup({explicit_done: true});
     20        var shape_margin_valid_unit_tests = [];
     21        ParsingUtils.validUnits.forEach(function(unit) {
     22            test = "10"+unit;
     23            testCase = new Object();
     24            // actual & expected_inline should be the same
     25            // expected_computed will get converted to the px value in the test framework
     26            testCase["actual"] = test;
     27            testCase["expected_inline"] = test;
     28            testCase["expected_computed"] = test;
     29            shape_margin_valid_unit_tests.push(testCase);
     30        });
     31 
     32        generate_tests( ParsingUtils.testShapeMarginInlineStyle,
     33                        ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "inline"));
     34        ParsingUtils.setupFonts();
     35        document.fonts.load("10px Ahem").then(()=> {
     36            generate_tests( ParsingUtils.testShapeMarginComputedStyle,
     37                            ParsingUtils.buildTestCases(shape_margin_valid_unit_tests, "computed"));
     38            ParsingUtils.restoreFonts();
     39            done();
     40        });
     41        </script>
     42    </body>
     43 </html>