summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html
blob: f39e83c19f9597963c4cec95ae0c2adc5260767d (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>
<title>CSS Flexbox: percentage height of replaced elements</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
<link rel="help" href="https://crbug.com/499766">
<meta name="assert" content="This test checks that percent heights of flex items' replaced children are resolved correctly" />
<link href="support/flexbox.css" rel="stylesheet">

<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>You should see no red -- the height should be considered definite</p>

<div class="flexbox" style="width: 100px; height: 150px; outline: 5px solid black;">
  <div style="background: red;">
    <img style="height: 100%; width: 100%;" src="support/100x100-green.png" data-expected-height="150">
  </div>
</div>

<div class="flexbox column" style="width: 100px; height: 150px; outline: 5px solid black;">
  <div class="flex-one" style="background: red;">
    <img style="height: 100%; width: 100%;" src="support/100x100-green.png" data-expected-height="150">
  </div>
</div>

<div class="flexbox" style="width: 100px; height: 150px; outline: 5px solid black;">
  <div style="background: red;">
    <object style="height: 100%; width: 100%;" data="support/100x100-green.png" data-expected-height="150"></object>
  </div>
</div>

<div class="flexbox" style="width: 100px; height: 150px; outline: 5px solid black;">
  <div style="background: red;">
    <embed style="display:inline-block; height: 100%; width: 100%;" type="application/x-webkit-test-webplugin" data-expected-height="150"></embed>
  </div>
</div>