wpt / css / css-exclusions / wrap-flow-005.html

Status: FAIL | Duration: 48ms | Subtests: 0/1 | Open test on wpt.live | wpt.fyi

/css/css-exclusions/wrap-flow-005.html

<!DOCTYPE HTML>
<html>
    <head>
        <title>CSS Exclusions Test: wrap-flow property set to end</title>
        <link rel="author" title="Jacob Goldstein" href="mailto:jacobg@adobe.com">
        <link rel="help" href="http://www.w3.org/TR/css3-exclusions/#wrap-flow-property">
        <meta name="flags" content="ahem dom">
        <meta name="assert" content="Text should flow on the right side of the exclusion, as well as above and below">
        <script src="/resources/testharness.js"></script>
        <script src="/resources/testharnessreport.js"></script>
        <script src="resources/helper.js"></script>
        <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
        <style>
            * {
                margin: 0px;
                padding: 0px;
            }
            .exclusion {
                wrap-flow: end;
                position: absolute;
                top: 15px;
                left: 70px;
                width: 60px;
                height: 25px;
                background: blue;
            }
            #content {
                width: 400px;
                line-height: 12px;
                font: 12px Ahem;
            }
        </style>
    </head>
    <body>
        <div class="exclusion"></div>

        <div id="content">
            <span id="line1">ethical beer craft</span><BR>
            <span id="line2">jean</span><BR>
            <span id="line3">fun</span><BR>
            <span id="line4">swags</span><BR>
            <span id="line5">american apparel squid</span>
        </div>

        <div id="log"></div>

        <script type="text/javascript">
            setup(() => {
                assert_implements(CSS.supports('wrap-flow', 'end'), "'wrap-flow: end'");
            }, {explicit_done: true});
            document.fonts.ready.then(() => {
                /* Line 1 */
                test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the 'line1' span is positioned correctly");
                test(function() {assert_equals(checkLinePos("line1",0,"left"), true)}, "Verify left of the 'line1' span is positioned correctly");
                /* Line 2 */
                test(function() {assert_equals(checkLinePos("line2",12,"top"), true)}, "Verify top of the 'line2' span is positioned correctly");
                test(function() {assert_equals(checkLinePos("line2",130,"left"), true)}, "Verify left of the 'line2' span is positioned correctly");
                /* Line 3 */
                test(function() {assert_equals(checkLinePos("line3",24,"top"), true)}, "Verify top of the 'line3' span is positioned correctly");
                test(function() {assert_equals(checkLinePos("line3",130,"left"), true)}, "Verify left of the 'line3' span is positioned correctly");
                /* Line 4 */
                test(function() {assert_equals(checkLinePos("line4",36,"top"), true)}, "Verify top of the 'line4' span is positioned correctly");
                test(function() {assert_equals(checkLinePos("line4",130,"left"), true)}, "Verify left of the 'line4' span is positioned correctly");
                /* Line 5 */
                test(function() {assert_equals(checkLinePos("line5",48,"top"), true)}, "Verify top of the 'line5' span is positioned correctly");
                test(function() {assert_equals(checkLinePos("line5",0,"left"), true)}, "Verify left of the 'line5' span is positioned correctly");
                done();
            });
        </script>
    </body>
</html>