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.js26
1 files changed, 0 insertions, 26 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
deleted file mode 100644
index 70d1b7e4572..00000000000
--- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-worklet.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import {areArraysEqual} from '/common/arrays.js';
-
-registerLayout('test', class {
- static get inputProperties() {
- return [ '--child-expected'];
- }
-
- static get childInputProperties() {
- return [ '--child' ];
- }
-
- 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 = await Promise.all(children.map(child => child.layoutNextFragment({})));
-
- if (!areArraysEqual(expected, actual))
- return {autoBlockSize: 0, childFragments};
-
- return {autoBlockSize: 100, childFragments};
- }
-});