summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html')
-rw-r--r--testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html b/testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html
new file mode 100644
index 0000000000..0dbbb2f940
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/aspect-ratio-affects-container-width-when-height-changes.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes">
+<p>There should be a green square below, and no red.</p>
+<div id="container" style="height:200px;">
+ <div style="height:100%;" data-expected-height="100">
+ <div style="float:left; height:100%; background:red;" data-expected-width="100" data-expected-height="100">
+ <!-- The image is a 1x1 transparent one. -->
+ <img style="display:block; height:100%; background:green;" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-expected-width="100" data-expected-height="100">
+ </div>
+ </div>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/check-layout-th.js"></script>
+<script>
+ test(()=> {
+ document.body.offsetTop;
+ document.getElementById("container").style.height = "100px";
+ checkLayout("#container");
+ }, "Changing height should affect the descendant widths, due to aspect ratio");
+</script>