summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/PerformanceTests/Layout/flexbox-row-wrap.html
blob: df46b0c849ff49c83654d69fec6aecf55d18d8f5 (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
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<script src="../resources/runner.js"></script>
</head>
<body style="overflow-y: scroll">

<div id="flexbox" style="width: 300px; flex-wrap: wrap; justify-content: center; align-items: center">
    <div style="flex: 1 120px">1</div>
    <div style="flex: 2 auto">2<br>2</div>
    <div style="flex: 3 120px">3<br>3<br>3</div>
    <div style="flex: 4 auto">4<br>4<br>4<br>4</div>
    <div style="flex: 5 120px">5<br>5<br>5<br>5<br>5</div>
    <div style="flex: 6 auto">6<br>6<br>6<br>6<br>6<br>6</div>
    <div style="flex: 7 120px">7<br>7<br>7<br>7<br>7<br>7<br>7</div>
    <div style="flex: 8 auto">8<br>8<br>8<br>8<br>8<br>8<br>8<br>8</div>
    <div style="flex: 9 120px">9<br>9<br>9<br>9<br>9<br>9<br>9<br>9<br>9</div>
    <div style="flex: 10 auto">10<br>10<br>10<br>10<br>10<br>10<br>10<br>10<br>10</div>
</div>

</body>
<script>
function runTest()
{
    document.getElementById("flexbox").style.display = 'flex';
    PerfTestRunner.forceLayoutOrFullFrame();
    document.getElementById("flexbox").style.display = '';
    PerfTestRunner.forceLayoutOrFullFrame();
}

PerfTestRunner.measureRunsPerSecond({
    description: "Measures performance of flexbox with wrapping (row).",
    run: runTest,
    done: function() {
        document.getElementById("flexbox").style.display = 'none';
    }
});
</script>
</html>