summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html b/testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html
new file mode 100644
index 0000000000..f39e83c19f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/percentage-heights-013.html
@@ -0,0 +1,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>