diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html')
-rw-r--r-- | tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html index cc1875bd61d..e33a6ff0eea 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fragment-data-immutable.https.html @@ -29,18 +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) { - const childFragment10 = yield child.layoutNextFragment({fixedInlineSize: 10}); + const childFragment10 = await child.layoutNextFragment({fixedInlineSize: 10}); // First layout data should be "10". if (childFragment10.data.size !== 10) { return {autoBlockSize: 0, childFragments: [childFragment10]}; } - const childFragment20 = yield child.layoutNextFragment({fixedInlineSize: 20}); + const childFragment20 = await child.layoutNextFragment({fixedInlineSize: 20}); // Second layout data should be "20". if (childFragment20.data.size !== 20) { @@ -57,9 +56,8 @@ registerLayout('parent', class { }); registerLayout('child', class { - *intrinsicSizes() {} - *layout() {} - *layout(children, edges, constraints, styleMap) { + async intrinsicSizes() {} + async layout(children, edges, constraints, styleMap) { return {autoBlockSize: 10, data: {size: constraints.fixedInlineSize}}; } }); |