From c6c4fb2f7a62b295c39e53a8600b74df203e53ab Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Mon, 26 Mar 2018 21:10:36 -0400 Subject: Update web-platform-tests to revision 06f77f6bfaa86f3643a79f1ec2c49c6b6955cf18 --- .../web-platform-tests/common/worklet-reftest.js | 32 ++++--- .../css-flexbox/table-as-item-auto-min-width.html | 11 +++ .../fallback-layout-invalid-child.https.html | 84 +++++++++++++++++ ...back-layout-invalid-fragment-request.https.html | 84 +++++++++++++++++ .../fallback-layout-invalid-fragment.https.html | 82 ++++++++++++++++ ...rm-child-layout-fixed-block-size-vrl.https.html | 61 ++++++++++++ ...erform-child-layout-fixed-block-size.https.html | 60 ++++++++++++ ...m-child-layout-fixed-inline-size-vrl.https.html | 61 ++++++++++++ ...rform-child-layout-fixed-inline-size.https.html | 60 ++++++++++++ .../support/layout-child-fixed-sizes-worklet.js | 52 +++++++++++ .../css-layout-api/support/layout-child-worklet.js | 6 +- .../intrinsic-percent-non-replaced-001-ref.html | 71 ++++++++++++++ .../intrinsic-percent-non-replaced-001.html | 71 ++++++++++++++ .../intrinsic-percent-non-replaced-002-ref.html | 71 ++++++++++++++ .../intrinsic-percent-non-replaced-002.html | 70 ++++++++++++++ .../intrinsic-percent-non-replaced-003.html | 71 ++++++++++++++ .../properties/block-size.html | 51 ++++++++++ .../properties/font-family.html | 23 +++++ .../properties/font-language-override.html | 24 +++++ .../properties/font-optical-sizing.html | 21 +++++ .../properties/font-palette.html | 26 ++++++ .../properties/font-presentation.html | 22 +++++ .../properties/font-size-adjust.html | 24 +++++ .../the-stylepropertymap/properties/font-size.html | 103 +++++++++++---------- .../properties/font-stretch.html | 32 +++++++ .../properties/font-synthesis.html | 27 ++++++ .../properties/font-variant-alternates.html | 31 +++++++ .../properties/font-variant-emoji.html | 22 +++++ .../properties/font-variant.html | 21 +++++ .../properties/font-variation-settings.html | 24 +++++ .../the-stylepropertymap/properties/font.html | 24 +++++ .../the-stylepropertymap/properties/gap.html | 30 ++++++ .../properties/inline-size.html | 51 ++++++++++ .../dom/nodes/Element-classlist.html | 22 +++++ .../MediaDevices-enumerateDevices.https.html | 2 + .../MediaStreamTrack-getCapabilities.https.html | 2 + .../web-platform-tests/resources/test/README.md | 14 +-- .../tools/wptrunner/wptrunner/executors/base.py | 18 +++- .../workers/modules/dedicated-worker-import.html | 48 ++++++++++ .../modules/dedicated-worker-static-import.html | 21 ----- ...dynamic-import-and-then-static-import-worker.js | 2 + .../modules/resources/dynamic-import-worker.js | 2 + .../resources/nested-dynamic-import-worker.js | 2 + .../resources/nested-static-import-worker.js | 1 + ...static-import-and-then-dynamic-import-worker.js | 2 + .../modules/resources/static-import-worker.js | 1 + 46 files changed, 1550 insertions(+), 90 deletions(-) create mode 100644 tests/wpt/web-platform-tests/css/css-flexbox/table-as-item-auto-min-width.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html create mode 100644 tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-003.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/block-size.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-family.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-language-override.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-optical-sizing.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-palette.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-presentation.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size-adjust.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-stretch.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-alternates.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variation-settings.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/inline-size.html create mode 100644 tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import.html delete mode 100644 tests/wpt/web-platform-tests/workers/modules/dedicated-worker-static-import.html create mode 100644 tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js create mode 100644 tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-worker.js create mode 100644 tests/wpt/web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js create mode 100644 tests/wpt/web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js (limited to 'tests/wpt/web-platform-tests') diff --git a/tests/wpt/web-platform-tests/common/worklet-reftest.js b/tests/wpt/web-platform-tests/common/worklet-reftest.js index 49e129ee0aa..abdda5b05e7 100644 --- a/tests/wpt/web-platform-tests/common/worklet-reftest.js +++ b/tests/wpt/web-platform-tests/common/worklet-reftest.js @@ -1,25 +1,33 @@ +// Imports code into a worklet. E.g. +// +// importWorklet(CSS.paintWorklet, {url: 'script.js'}); +// importWorklet(CSS.paintWorklet, '/* javascript string */'); +function importWorklet(worklet, code) { + let url; + if (typeof code === 'object') { + url = code.url; + } else { + const blob = new Blob([code], {type: 'text/javascript'}); + url = URL.createObjectURL(blob); + } + + return worklet.addModule(url); +} + // To make sure that we take the snapshot at the right time, we do double // requestAnimationFrame. In the second frame, we take a screenshot, that makes // sure that we already have a full frame. -function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) { +async function importWorkletAndTerminateTestAfterAsyncPaint(worklet, code) { if (typeof worklet === 'undefined') { takeScreenshot(); return; } - let url; - if (typeof code === 'object') { - url = code.url; - } else { - const blob = new Blob([code], {type: 'text/javascript'}); - url = URL.createObjectURL(blob); - } + await importWorklet(worklet, code); - worklet.addModule(url).then(function() { + requestAnimationFrame(function() { requestAnimationFrame(function() { - requestAnimationFrame(function() { - takeScreenshot(); - }); + takeScreenshot(); }); }); } diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/table-as-item-auto-min-width.html b/tests/wpt/web-platform-tests/css/css-flexbox/table-as-item-auto-min-width.html new file mode 100644 index 00000000000..66a77327f0f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/table-as-item-auto-min-width.html @@ -0,0 +1,11 @@ + +CSS Flexbox Test: Flex item as table, specified width less than minimum intrinsic width + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html new file mode 100644 index 00000000000..19b4188a839 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-child.https.html @@ -0,0 +1,84 @@ + + + + + + + + + +
+
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html new file mode 100644 index 00000000000..ccbf38b4fd2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment-request.https.html @@ -0,0 +1,84 @@ + + + + + + + + + +
+
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html new file mode 100644 index 00000000000..e4253ff3935 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/fallback-layout-invalid-fragment.https.html @@ -0,0 +1,82 @@ + + + + + + + + + +
+
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html new file mode 100644 index 00000000000..1fbfec9f792 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html @@ -0,0 +1,61 @@ + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html new file mode 100644 index 00000000000..a158840894f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html @@ -0,0 +1,60 @@ + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html new file mode 100644 index 00000000000..8fab5e44ac4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html @@ -0,0 +1,61 @@ + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html new file mode 100644 index 00000000000..79d2aca2a75 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html @@ -0,0 +1,60 @@ + + + + + + + + + + +
+
+
+ +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js new file mode 100644 index 00000000000..73155732971 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js @@ -0,0 +1,52 @@ +import {areArraysEqual} from '/common/arrays.js'; + +function parseNumber(value) { + const num = parseInt(value.toString()); + if (isNaN(num)) return undefined; + return num; +} + +registerLayout('test', class { + static get childInputProperties() { + return [ + '--fixed-inline-size', + '--fixed-block-size', + '--inline-size-expected', + '--block-size-expected' + ]; + } + + *intrinsicSizes() {} + *layout(children, edges, constraints, styleMap) { + const childFragments = yield children.map((child) => { + const childConstraints = {}; + const fixedInlineSize = parseNumber(child.styleMap.get('--fixed-inline-size')); + const fixedBlockSize = parseNumber(child.styleMap.get('--fixed-block-size')); + return child.layoutNextFragment({fixedInlineSize, fixedBlockSize}); + }); + + const actual = childFragments.map((childFragment) => { + return { + inlineSize: childFragment.inlineSize, + blockSize: childFragment.blockSize, + }; + }); + + const expected = children.map((child) => { + return { + inlineSize: parseInt(child.styleMap.get('--inline-size-expected').toString()), + blockSize: parseInt(child.styleMap.get('--block-size-expected').toString()), + }; + }); + + const equalityFunc = (a, b) => { + return a.inlineSize == b.inlineSize && a.blockSize == b.blockSize; + }; + + if (!areArraysEqual(expected, actual, equalityFunc)) { + return {autoBlockSize: 0, childFragments}; + } + + return {autoBlockSize: 100, childFragments}; + } +}); 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 0daa89d45a1..db20e2ec76b 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 @@ -16,9 +16,11 @@ registerLayout('test', class { return child.styleMap.get('--child').toString().trim(); }); + const childFragments = yield children.map((child) => { return child.layoutNextFragment({}); }); + if (!areArraysEqual(expected, actual)) - return {autoBlockSize: 0}; + return {autoBlockSize: 0, childFragments}; - return {autoBlockSize: 100}; + return {autoBlockSize: 100, childFragments}; } }); diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001-ref.html new file mode 100644 index 00000000000..0b217dd192c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001-ref.html @@ -0,0 +1,71 @@ + +Reference + + + + +
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+ + +
+
p p
+
+
+
p p
+
+
+
p p
+
+
+
p p
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001.html new file mode 100644 index 00000000000..19b0a94fe36 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-001.html @@ -0,0 +1,71 @@ + +Percentages of min-width on non-replaced blocks are ignored for intrinsic sizing and resolved afterwards + + + + + + +
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+ + +
+
p p
+
+
+
p p
+
+
+
p p
+
+
+
p p
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002-ref.html new file mode 100644 index 00000000000..bb818918e2a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002-ref.html @@ -0,0 +1,71 @@ + +Reference + + + + +
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+ + +
+
p p
+
+
+
p p
+
+
+
p p
+
+
+
p p
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002.html new file mode 100644 index 00000000000..763549fb186 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-002.html @@ -0,0 +1,70 @@ + +Percentages of max-width on non-replaced blocks are ignored for intrinsic sizing and resolved afterwards + + + + + +
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+ + +
+
p p
+
+
+
p p
+
+
+
p p
+
+
+
p p
+
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-003.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-003.html new file mode 100644 index 00000000000..2dd247c9b8e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-percent-non-replaced-003.html @@ -0,0 +1,71 @@ + +Percentages of width on non-replaced blocks are ignored for intrinsic sizing and resolved afterwards + + + + + + +
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+
+
ppp pp
+
+ + +
+
p p
+
+
+
p p
+
+
+
p p
+
+
+
p p
+
diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/block-size.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/block-size.html new file mode 100644 index 00000000000..d1a1e095775 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/block-size.html @@ -0,0 +1,51 @@ + + +'block-size' property + + + + + + + + +
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-family.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-family.html new file mode 100644 index 00000000000..eb35ef1799b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-family.html @@ -0,0 +1,23 @@ + + +'font-family' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-language-override.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-language-override.html new file mode 100644 index 00000000000..daf380389eb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-language-override.html @@ -0,0 +1,24 @@ + + +'font-language-override' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-optical-sizing.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-optical-sizing.html new file mode 100644 index 00000000000..0018ef1390b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-optical-sizing.html @@ -0,0 +1,21 @@ + + +'font-optical-sizing' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-palette.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-palette.html new file mode 100644 index 00000000000..ad62945f6bc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-palette.html @@ -0,0 +1,26 @@ + + +'font-palette' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-presentation.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-presentation.html new file mode 100644 index 00000000000..44484660d6d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-presentation.html @@ -0,0 +1,22 @@ + + +'font-presentation' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size-adjust.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size-adjust.html new file mode 100644 index 00000000000..71cb54c7272 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size-adjust.html @@ -0,0 +1,24 @@ + + +'font-size-adjust' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html index 620f68ff653..fc76e0f8764 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-size.html @@ -13,53 +13,60 @@ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-stretch.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-stretch.html new file mode 100644 index 00000000000..3871ff3e04f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-stretch.html @@ -0,0 +1,32 @@ + + +'font-stretch' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis.html new file mode 100644 index 00000000000..b8c79e6cafe --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-synthesis.html @@ -0,0 +1,27 @@ + + +'font-synthesis' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-alternates.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-alternates.html new file mode 100644 index 00000000000..521eb3a68ae --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-alternates.html @@ -0,0 +1,31 @@ + + +'font-variant-alternates' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji.html new file mode 100644 index 00000000000..38cd6d237be --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant-emoji.html @@ -0,0 +1,22 @@ + + +'font-variant-emoji' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant.html new file mode 100644 index 00000000000..765ce28bd84 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variant.html @@ -0,0 +1,21 @@ + + +'font-variant' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variation-settings.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variation-settings.html new file mode 100644 index 00000000000..12d62618bc0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font-variation-settings.html @@ -0,0 +1,24 @@ + + +'font-variation-settings' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font.html new file mode 100644 index 00000000000..b8a1e88a271 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/font.html @@ -0,0 +1,24 @@ + + +'font' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap.html new file mode 100644 index 00000000000..e07d1cd54d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/gap.html @@ -0,0 +1,30 @@ + + +'*-gap' properties + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/inline-size.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/inline-size.html new file mode 100644 index 00000000000..f509d4a33e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/inline-size.html @@ -0,0 +1,51 @@ + + +'inline-size' property + + + + + + + + +
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html index 2b376d4cb00..5453da90da6 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html +++ b/tests/wpt/web-platform-tests/dom/nodes/Element-classlist.html @@ -31,6 +31,13 @@ function checkModification(e, funcName, args, expectedRes, before, after, } setClass(e, before); + var obs; + // If we have MutationObservers available, do some checks to make + // sure attribute sets are happening at sane times. + if (self.MutationObserver) { + obs = new MutationObserver(() => {}); + obs.observe(e, { attributes: true }); + } if (shouldThrow) { assert_throws(expectedException, function() { var list = e.classList; @@ -40,6 +47,21 @@ function checkModification(e, funcName, args, expectedRes, before, after, var list = e.classList; var res = list[funcName].apply(list, args); } + if (obs) { + var mutationRecords = obs.takeRecords(); + obs.disconnect(); + if (shouldThrow) { + assert_equals(mutationRecords.length, 0, + "There should have been no mutation"); + } else if (funcName == "replace") { + assert_equals(mutationRecords.length == 1, + expectedRes, + "Should have a mutation exactly when replace() returns true"); + } else { + // For other functions, would need to check when exactly + // mutations are supposed to happen. + } + } if (!shouldThrow) { assert_equals(res, expectedRes, "wrong return value"); } diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html index a29b5832a9e..c66251a03f3 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html @@ -33,6 +33,8 @@ promise_test(function() { assert_equals(typeof capabilities.groupId, "string", "groupId must be a string."); if (mediainfo.kind == "audioinput") { assert_equals(typeof capabilities.echoCancellation, "object", "echoCancellation must be an object."); + assert_equals(typeof capabilities.autoGainControl, "object", "autoGainControl must be an object."); + assert_equals(typeof capabilities.noiseSuppression, "object", "noiseSuppression must be an object."); } if (mediainfo.kind == "videoinput") { assert_equals(typeof capabilities.facingMode, "object", "facingMode must be an object."); diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html index 30f5d50079a..257578f67ca 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html @@ -12,6 +12,8 @@ var videoCapabilities = stream.getVideoTracks()[0].getCapabilities(); assert_true(undefined !== audioCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for an audio track."); assert_true(undefined !== audioCapabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist for an audio track."); + assert_true(undefined !== audioCapabilities.autoGainControl, "MediaTrackCapabilities's autoGainControl should exist for an audio track."); + assert_true(undefined !== audioCapabilities.noiseSuppression, "MediaTrackCapabilities's noiseSuppression should exist for an audio track."); assert_true(undefined !== videoCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for a video track."); }); }); diff --git a/tests/wpt/web-platform-tests/resources/test/README.md b/tests/wpt/web-platform-tests/resources/test/README.md index 773b83bfc05..c228372399c 100644 --- a/tests/wpt/web-platform-tests/resources/test/README.md +++ b/tests/wpt/web-platform-tests/resources/test/README.md @@ -11,16 +11,18 @@ Install the following dependencies: - [the Mozilla Firefox web browser](https://mozilla.org/firefox) - [the GeckoDriver server](https://github.com/mozilla/geckodriver) -Once these dependencies are satisfied, the tests may be run from a command line -by executing the following command from this directory: +Make sure `geckodriver` can be found in your `PATH`. - tox +Currently, the tests should be run with the latest *Firefox Nightly*. In order to +specify the path to Firefox Nightly, use the following command-line option: -Currently, the tests should be run with Firefox Nightly. + tox -- --binary=/path/to/FirefoxNightly -In order to specify the path to Firefox Nightly, use the following command-line option: +### Automated Script - tox -- --binary=/path/to/FirefoxNightly +Alternatively, you may run `tools/ci/ci_resources_unittest.sh`, which only depends on +Python 2. The script will install other dependencies automatically and start `tox` with +the correct arguments. ## Authoring Tests diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py index 708903f5dcd..fbb75d658ce 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py @@ -8,7 +8,7 @@ import urlparse from abc import ABCMeta, abstractmethod from ..testrunner import Stop -from protocol import Protocol +from protocol import Protocol, BaseProtocolPart here = os.path.split(__file__)[0] @@ -411,7 +411,23 @@ class WdspecRun(object): self.result_flag.set() +class ConnectionlessBaseProtocolPart(BaseProtocolPart): + def execute_script(self, script, async=False): + pass + + def set_timeout(self, timeout): + pass + + def wait(self): + pass + + def set_window(self, handle): + pass + + class ConnectionlessProtocol(Protocol): + implements = [ConnectionlessBaseProtocolPart] + def connect(self): pass diff --git a/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import.html b/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import.html new file mode 100644 index 00000000000..3d4236393ee --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-import.html @@ -0,0 +1,48 @@ + +DedicatedWorker: import + + + diff --git a/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-static-import.html b/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-static-import.html deleted file mode 100644 index ee5de185800..00000000000 --- a/tests/wpt/web-platform-tests/workers/modules/dedicated-worker-static-import.html +++ /dev/null @@ -1,21 +0,0 @@ - -DedicatedWorker: static import - - - diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js new file mode 100644 index 00000000000..eaa3f1c686e --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js @@ -0,0 +1,2 @@ +import('./static-import-worker.js') + .then(module => postMessage('LOADED')); diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-worker.js new file mode 100644 index 00000000000..98381b9da2a --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/modules/resources/dynamic-import-worker.js @@ -0,0 +1,2 @@ +import('./post-message-on-load-worker.js') + .then(module => postMessage('LOADED')); diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js new file mode 100644 index 00000000000..8f56d156e2a --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js @@ -0,0 +1,2 @@ +import('./dynamic-import-worker.js') + .then(module => postMessage('LOADED')); diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/nested-static-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/nested-static-import-worker.js index bcaf7d89c58..f2ef5207cae 100644 --- a/tests/wpt/web-platform-tests/workers/modules/resources/nested-static-import-worker.js +++ b/tests/wpt/web-platform-tests/workers/modules/resources/nested-static-import-worker.js @@ -1 +1,2 @@ import './static-import-worker.js'; +postMessage('LOADED') diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js new file mode 100644 index 00000000000..4e66d041a1b --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js @@ -0,0 +1,2 @@ +import './dynamic-import-worker.js'; +postMessage('LOADED'); diff --git a/tests/wpt/web-platform-tests/workers/modules/resources/static-import-worker.js b/tests/wpt/web-platform-tests/workers/modules/resources/static-import-worker.js index edb8caf34af..46931699e59 100644 --- a/tests/wpt/web-platform-tests/workers/modules/resources/static-import-worker.js +++ b/tests/wpt/web-platform-tests/workers/modules/resources/static-import-worker.js @@ -1 +1,2 @@ import './post-message-on-load-worker.js'; +postMessage('LOADED'); -- cgit v1.2.3