Commit 204e0c39 authored by cbiesinger's avatar cbiesinger Committed by Commit bot

[css-flexbox] Better test for min-height in nested flexboxes

This adds a much better testcase for bug 580196 -- this is a reduced version
of the original testcase for that bug, to ensure that we don't regress the
actual issue (which I almost did in https://codereview.chromium.org/2157093002/)

The testcase that I'm replacing was just verifying that we don't apply
min-height: auto to nested flexboxes, which is not very valuable.

BUG=580196
R=eae@chromium.org,dgrogan@chromium.org

Review-Url: https://codereview.chromium.org/2156403002
Cr-Commit-Position: refs/heads/master@{#406156}
parent 8f993338
...@@ -3,13 +3,39 @@ ...@@ -3,13 +3,39 @@
<script src="../../resources/testharness.js"></script> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script> <script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script> <script src="../../resources/check-layout-th.js"></script>
<body onload="checkLayout('.flexbox')"> <style>
<div id=log></div> #container {
height: 300px;
outline: 2px solid black;
}
<!-- This isn't "correct" per the spec, but it is an interim fix .inner
to avoid bad results. {
See https://crbug.com/580196 width: 400px;
--> flex: 1;
<div class="flexbox column" style="height: 0px;" data-expected-height="0"> background-color: green;
<div data-expected-height="0" style="display: flex;">Some text</div> }
</style>
<script>
function change() {
var container = document.getElementById('container');
container.offsetHeight;
container.style.height = '80px';
checkLayout('#container');
}
</script>
<body onload="change()">
<p>Green rectangle should be entirely within the black rectangle</p>
<div id="log"></div>
<div id="container">
<div class="flexbox column" style="height: 100%;">
<div class="flexbox flex-one">
<div class="flexbox column">
<div class="flexbox column flex-one">
<div class="inner" data-expected-height="80">
</div>
</div>
</div>
</div>
</div>
</div> </div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment