summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/selectors/style-sharing-last-child.html
blob: f6d7f4111f08d2efa6ec1303a476091ffdcd1b19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

function test() {
    var passed = document.getElementsByTagName('li')[2].offsetWidth > document.getElementsByTagName('li')[0].offsetWidth;
    document.getElementsByTagName('div')[0].innerText = passed ? "PASS" : "FAIL";
}
</script>
<style type="text/css">
    ul, li {display: inline;}
    ul {margin: 0;}
    li { float: left; }
    li:last-child:after {content: "4";}
</style>
</head>
<body onload="test()">
    You should see 1234 below (4 won't be visible in the DRT text dump, but it should still say PASS below)<br>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>
    <br>
    <div></div>
</body>
</html>