aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js')
-rw-r--r--tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js
index db20e2ec76b..70d1b7e4572 100644
--- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js
+++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js
@@ -9,14 +9,14 @@ registerLayout('test', class {
return [ '--child' ];
}
- *intrinsicSizes() {}
- *layout(children, edges, constraints, styleMap) {
+ async intrinsicSizes() {}
+ async layout(children, edges, constraints, styleMap) {
const expected = JSON.parse(styleMap.get('--child-expected').toString());
const actual = children.map((child) => {
return child.styleMap.get('--child').toString().trim();
});
- const childFragments = yield children.map((child) => { return child.layoutNextFragment({}); });
+ const childFragments = await Promise.all(children.map(child => child.layoutNextFragment({})));
if (!areArraysEqual(expected, actual))
return {autoBlockSize: 0, childFragments};