blob: 473f8a845aae2608ccb57078eedaf2e4715e2720 [file] [log] [blame]
<!DOCTYPE html>
<html>
<style>
.flexbox {
display: flex;
background-color: #aaa;
position: relative;
flex-wrap: wrap-reverse;
margin-top: 20px;
align-content: flex-start;
}
.flexbox > div {
border: 0;
}
.flexbox :nth-child(1) {
background-color: lightblue;
}
.flexbox :nth-child(2) {
background-color: lightgreen;
}
.flexbox :nth-child(3) {
background-color: pink;
}
.flexbox :nth-child(4) {
background-color: yellow;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script>
<body onload="checkLayout('.flexbox')">
<div id=log></div>
<p>Test to make sure that wrap-reverse starts at the cross start edge if
sizing is not auto.</p>
<div data-expected-width="200" data-expected-height="35" class="flexbox" style="width: 200px; height: 35px;">
<div data-offset-x="0" data-offset-y="15" style="flex: 1 100px; height: 20px"></div>
<div data-offset-x="100" data-offset-y="25" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="0" data-offset-y="5" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="100" data-offset-y="-5" style="flex: 1 100px; height: 20px"></div>
</div>
<div data-expected-width="200" data-expected-height="35" class="flexbox" style="width: 200px; max-height: 35px;">
<div data-offset-x="0" data-offset-y="15" style="flex: 1 100px; height: 20px"></div>
<div data-offset-x="100" data-offset-y="25" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="0" data-offset-y="5" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="100" data-offset-y="-5" style="flex: 1 100px; height: 20px"></div>
</div>
<div data-expected-width="200" data-expected-height="50" class="flexbox" style="width: 200px; min-height: 50px;">
<div data-offset-x="0" data-offset-y="30" style="flex: 1 100px; height: 20px"></div>
<div data-offset-x="100" data-offset-y="40" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="0" data-offset-y="20" style="flex: 1 100px; height: 10px"></div>
<div data-offset-x="100" data-offset-y="10" style="flex: 1 100px; height: 20px"></div>
</div>
<div data-expected-width="35" data-expected-height="200" class="flexbox" style="flex-direction: column; height: 200px; width: 35px">
<div data-offset-x="15" data-offset-y="0" style="flex: 1 100px; width: 20px"></div>
<div data-offset-x="25" data-offset-y="100" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="5" data-offset-y="0" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="-5" data-offset-y="100" style="flex: 1 100px; width: 20px"></div>
</div>
<div data-expected-width="35" data-expected-height="200" class="flexbox" style="flex-direction: column; height: 200px; max-width: 35px">
<div data-offset-x="15" data-offset-y="0" style="flex: 1 100px; width: 20px"></div>
<div data-offset-x="25" data-offset-y="100" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="5" data-offset-y="0" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="-5" data-offset-y="100" style="flex: 1 100px; width: 20px"></div>
</div>
<div data-expected-width="600" data-expected-height="200" class="flexbox" style="flex-direction: column; height: 200px; min-width: 50px; max-width: 600px">
<div data-offset-x="580" data-offset-y="0" style="flex: 1 100px; width: 20px"></div>
<div data-offset-x="590" data-offset-y="100" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="570" data-offset-y="0" style="flex: 1 100px; width: 10px"></div>
<div data-offset-x="560" data-offset-y="100" style="flex: 1 100px; width: 20px"></div>
</div>
</body>
</html>