summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/align-content-wrap-002.html
blob: a15f7ea844d112ab696a03d994cb17ed1fe47074 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#propdef-align-content" />
<title>css-flexbox: Tests align-content with flex-wrap: wrap</title>
<style>
.flex-horizontal {
    width:600px;
    display:flex;
    height:100px;
    background:gray;
    margin-bottom:100px;
}
.flex-vertical {
    width:100px;
    display:flex;
    flex-direction: column;
    height:600px;
    background:gray;
    margin-top:200px;
    margin-bottom:100px;
}
.item-horizontal {
    width:150px;
    background:yellow;
    margin:10px;
    flex:none;
}
.item-vertical {
    height:150px;
    background:yellow;
    margin:10px;
    flex:none;
}
.content1-horizontal {
    width:100px;
    height:150px;
    background:red;
}
.content2-horizontal {
    width:100px;
    height:100px;
    background:red;
}
.content3-horizontal {
    width:100px;
    height:50px;
    background:red;
}
.content1-vertical {
    width:150px;
    height:100px;
    background:red;
}
.content2-vertical {
    width:100px;
    height:100px;
    background:red;
}
.content3-vertical {
    width:50px;
    height:100px;
    background:red;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.flex-horizontal, .flex-vertical');">
<div id=log></div>
<p>Test for crbug.com/362848: Flex box word-wrap is not adhering to spec</p>
<div class="flex-horizontal">
    <div class="item-horizontal" data-expected-height="80"><div class="content1-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="80"><div class="content2-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="80"><div class="content3-horizontal"></div></div>
</div>

<div class="flex-horizontal" style="flex-wrap:wrap;">
    <div class="item-horizontal" data-expected-height="150"><div class="content1-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content2-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content3-horizontal"></div></div>
</div>

<div class="flex-horizontal" style="flex-wrap:wrap;">
    <div class="item-horizontal" data-expected-height="150"><div class="content1-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content2-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content3-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content1-horizontal"></div></div>
    <div class="item-horizontal" data-expected-height="150"><div class="content2-horizontal"></div></div>
</div>

<div class="flex-vertical">
    <div class="item-vertical" data-expected-width="80"><div class="content1-vertical"></div></div>
    <div class="item-vertical" data-expected-width="80"><div class="content2-vertical"></div></div>
    <div class="item-vertical" data-expected-width="80"><div class="content3-vertical"></div></div>
</div>

<div class="flex-vertical" style="flex-wrap:wrap;">
    <div class="item-vertical" data-expected-width="150"><div class="content1-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content2-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content3-vertical"></div></div>
</div>

<div class="flex-vertical" style="flex-wrap:wrap;">
    <div class="item-vertical" data-expected-width="150"><div class="content1-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content2-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content3-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content1-vertical"></div></div>
    <div class="item-vertical" data-expected-width="150"><div class="content2-vertical"></div></div>
</div>