diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-08-09 07:34:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-09 07:34:23 -0400 |
commit | 6775c69da128608fa6f7f11e19232c05a3b92365 (patch) | |
tree | 9424c5ed8c468e6d31b6c50e7b1d6235fdc9257b /tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-unresolved-promise.https.html | |
parent | 90fb4c3589718805f0b6d83c5e74222cf6234cb9 (diff) | |
parent | 9f1d1e8b63592f56aaeba2cfa0eb99edab1531be (diff) | |
download | servo-6775c69da128608fa6f7f11e19232c05a3b92365.tar.gz servo-6775c69da128608fa6f7f11e19232c05a3b92365.zip |
Auto merge of #23935 - servo-wpt-sync:wpt_update_08-08-2019, r=servo-wpt-sync
Sync WPT with upstream (08-08-2019)
Automated downstream sync of changes from upstream as of 08-08-2019.
[no-wpt-sync]
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23935)
<!-- Reviewable:end -->
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> |