diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-08-08 10:23:28 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2019-08-08 14:19:30 +0000 |
commit | 9f1d1e8b63592f56aaeba2cfa0eb99edab1531be (patch) | |
tree | 0b8948fb1ac1270c16de298c2856b972f494ecd0 /tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html | |
parent | 555fa75b2c7f4faa0818e86296a4ea3d5b8e4d42 (diff) | |
download | servo-9f1d1e8b63592f56aaeba2cfa0eb99edab1531be.tar.gz servo-9f1d1e8b63592f56aaeba2cfa0eb99edab1531be.zip |
Update web-platform-tests to revision 0d4300c5045a5587c2eb3d1416b11ffeecf5dadc
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html')
-rw-r--r-- | tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html new file mode 100644 index 00000000000..369c56e4f94 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback"> +<link rel="match" href="fallback-ref.html"> +<meta name="assert" content="This test checks that a layout() class with a layout function that doesn't return a promise will fallback to block layout." /> +<style> +.test { + background: red; + border: solid 2px; + width: 100px; +} + +.child { + height: 100px; +} + +@supports (display: layout(unresolved-promise)) { + .test { + display: layout(unresolved-promise); + background: green; + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <div class="child"></div> +</div> + +<script id="code" type="text/worklet"> +registerLayout('unresolved-promise', class { + async intrinsicSizes() {} + layout() { return new Promise(() => { /* never resolves */ }); } +}); +</script> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent); +</script> +</html> |