Files
firefox/testing/web-platform/tests/css/css-layout-api/fallback-layout/error.https.html
T
Ian Kilpatrick af617cdb4b Bug 1574537 [wpt PR 18503] - [css-layout-api] Move tests into various sub-directories., a=testonly
Automatic update from web-platform-tests
[css-layout-api] Move tests into various sub-directories.

Tests-only. Moves tests into logically grouped sub-directories.
This speeds up (local) test runs as parallelization happens on a per
directory basis.

Bug: 726125
Change-Id: I963184ea74675a4c662ec4779afafa085c33ea0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1757890
Commit-Queue: Ian Kilpatrick <[email protected]>
Auto-Submit: Ian Kilpatrick <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/master@{#687807}

--

wpt-commits: f10378fa073caba1a793c28801a5231aeab95279
wpt-pr: 18503
2019-08-27 04:11:28 +00:00

51 lines
1.2 KiB
HTML

<!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 throwing layout function will fallback to block layout." />
<style>
.test {
background: red;
border: solid 2px;
width: 100px;
}
.float {
float: left;
width: 50%;
height: 100px;
}
.fc {
display: flow-root;
height: 100px;
}
@supports (display: layout(throwing-layout)) {
.test {
display: layout(throwing-layout);
background: green;
}
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>
<!-- This tests that when the "layout()" layout function fails, it will fallback to block layout. -->
<div class="test">
<div class="float"></div>
<div class="fc"></div>
</div>
<script id="code" type="text/worklet">
registerLayout('throwing-layout', class {
async intrinsicSizes() {}
async layout() { throw Error('fail!'); }
});
</script>
<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
</script>
</html>