tor-browser

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

wrap-flow-006.html (3206B)


      1 <!DOCTYPE HTML>
      2 <html>
      3    <head>
      4        <title>CSS Exclusions Test: wrap-flow property set to maximum</title>
      5        <link rel="author" title="Jacob Goldstein" href="mailto:jacobg@adobe.com">
      6        <link rel="help" href="http://www.w3.org/TR/css3-exclusions/#wrap-flow-property">
      7        <meta name="flags" content="ahem dom">
      8        <meta name="assert" content="Text should flow in the left OR right side of the exclusion depending on which has more space, as well as above and below">
      9        <script src="/resources/testharness.js"></script>
     10        <script src="/resources/testharnessreport.js"></script>
     11        <script src="resources/helper.js"></script>
     12        <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
     13        <style>
     14            * {
     15                margin: 0px;
     16                padding: 0px;
     17            }
     18            .exclusion {
     19                wrap-flow: maximum;
     20                position: absolute;
     21                top: 40px;
     22                left: 40px;
     23                width: 60px;
     24                height: 25px;
     25                background: blue;
     26            }
     27            #content {
     28                width: 400px;
     29                line-height: 12px;
     30                font: 12px Ahem;
     31            }
     32        </style>
     33    </head>
     34    <body>
     35        <div class="exclusion"></div>
     36 
     37        <div id="content">
     38            <span id="line1">ethical<BR>beer<BR>craft<BR></span>
     39            <span id="line2">foo</span>
     40            <span id="line3">sed</span>
     41            <span id="line4">Vegan<BR>cliche<BR>retro</span>
     42        </div>
     43 
     44        <div id="log"></div>
     45 
     46        <script type="text/javascript">
     47            setup(() => {
     48                assert_implements(CSS.supports('wrap-flow', 'maximum'), "'wrap-flow: maximum'");
     49            }, {explicit_done: true});
     50            document.fonts.ready.then(() => {
     51                /*Line 1*/
     52                test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the 'line1' span is positioned correctly");
     53                test(function() {assert_equals(checkLinePos("line1",0,"left"), true)}, "Verify left of the 'line1' span is positioned correctly");
     54                /*Line 2*/
     55                test(function() {assert_equals(checkLinePos("line2",36,"top"), true)}, "Verify top of the 'line2' span is positioned correctly");
     56                test(function() {assert_equals(checkLinePos("line2",100,"left"), true)}, "Verify left of the 'line2' span is positioned correctly");
     57                /*Line 3*/
     58                test(function() {assert_equals(checkLinePos("line3",48,"top"), true)}, "Verify top of the 'line3' span is positioned correctly");
     59                test(function() {assert_equals(checkLinePos("line3",100,"left"), true)}, "Verify left of the 'line3' span is positioned correctly");
     60                /*Line 4*/
     61                test(function() {assert_equals(checkLinePos("line4",65,"top"), true)}, "Verify top of the 'line4' span is positioned correctly");
     62                test(function() {assert_equals(checkLinePos("line4",0,"left"), true)}, "Verify left of the 'line4' span is positioned correctly");
     63                done();
     64            });
     65        </script>
     66    </body>
     67 </html>