aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html')
-rw-r--r--tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html
index eb652d9a552..8659c2edef5 100644
--- a/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html
+++ b/tests/wpt/web-platform-tests/css/css-layout-api/constraints-data-sab-failure.https.html
@@ -29,23 +29,17 @@
<script id="code" type="text/worklet">
registerLayout('parent', class {
- *intrinsicSizes() {}
- *layout() {}
- *layout([child], edges, constraints, styleMap) {
+ async intrinsicSizes() {}
+ async layout([child], edges, constraints, styleMap) {
let childFragment = null;
try {
- // We need SABs to be enabled to properly run this test.
- if (typeof SharedArrayBuffer !== 'undefined') {
- childFragment = yield child.layoutNextFragment({
- data: { sab: new SharedArrayBuffer(4) }
- });
- } else {
- throw Error();
- }
+ childFragment = await child.layoutNextFragment({
+ data: { sab: new SharedArrayBuffer(4) }
+ });
} catch(e) {
// Success! The structured cloning algorithm should have thrown an error.
- childFragment = yield child.layoutNextFragment({});
+ childFragment = await child.layoutNextFragment({});
return {autoBlockSize: 100, childFragments: [childFragment]};
}
@@ -54,9 +48,8 @@ registerLayout('parent', class {
});
registerLayout('child', class {
- *intrinsicSizes() {}
- *layout() {}
- *layout() {
+ async intrinsicSizes() {}
+ async layout() {
return {autoBlockSize: 0};
}
});