aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html
diff options
context:
space:
mode:
authorWPT Sync Bot <josh+wptsync@joshmatthews.net>2018-09-23 21:29:48 -0400
committerWPT Sync Bot <josh+wptsync@joshmatthews.net>2018-09-23 23:26:42 -0400
commit20a08918d9abaf9c648052252f821e52bd6d4af6 (patch)
treed5ed86de77e1b7990cbf26e6ddf7dee911929cff /tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html
parent647796ede66ad84acf6239d8b556ee3735bfc6a6 (diff)
downloadservo-20a08918d9abaf9c648052252f821e52bd6d4af6.tar.gz
servo-20a08918d9abaf9c648052252f821e52bd6d4af6.zip
Update web-platform-tests to revision 3d117ae1266e6bd039a3a1ab92b27e82c3ccc92d
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html')
-rw-r--r--tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html
new file mode 100644
index 00000000000..dfbc812556f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-layout-api/child-constraints/available-block-size-invalid.https.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableblocksize">
+<link rel="match" href="../green-square-ref.html">
+<meta name="assert" content="This test checks that setting an invalid available block-size works as expected." />
+
+<style>
+.test {
+ writing-mode: horizontal-tb;
+ background: red;
+ width: 100px;
+}
+
+.child {
+ writing-mode: vertical-rl;
+ visibility: hidden;
+ line-height: 0;
+
+ --available-block-size: -20;
+}
+
+.inline {
+ display: inline-block;
+ width: 8px;
+}
+
+.inline-size-10 { height: 10px; }
+
+@supports (display: layout(test)) {
+ .test {
+ background: green;
+ display: layout(test);
+ }
+}
+</style>
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/worklet-reftest.js"></script>
+
+<div class="test">
+ <!-- The invalid available block-size should be clamped to zero. -->
+ <div class="child" style="--block-size-expected: 10; --inline-size-expected: 16;">
+ <span class="inline inline-size-10"></span>
+ <span class="inline inline-size-10"></span>
+ </div>
+</div>
+
+<script>
+importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: '../support/layout-child-sizes-worklet.js'});
+</script>