diff --git a/test/common/wpt.js b/test/common/wpt.js index dcf5d943416950..b16f7ce3e7d1a2 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -269,8 +269,11 @@ class StatusLoader { load() { const dir = path.join(__dirname, '..', 'wpt'); - const statusFile = path.join(dir, 'status', `${this.path}.json`); - const result = JSON.parse(fs.readFileSync(statusFile, 'utf8')); + const statusFile = path.join(dir, 'status', `${this.path}.js`); + if (!fs.existsSync(statusFile)) { + throw new Error(`Missing ${statusFile} WPT status file.`); + } + const result = require(statusFile); this.rules.addRules(result); const subDir = fixtures.path('wpt', this.path); @@ -595,13 +598,13 @@ class WPTRunner { `${failures.length} unexpected failures,`, `${unexpectedPasses.length} unexpected passes`); if (failures.length > 0) { - const file = path.join('test', 'wpt', 'status', `${this.path}.json`); + const file = path.join('test', 'wpt', 'status', `${this.path}.js`); throw new Error( `Found ${failures.length} unexpected failures. ` + `Consider updating ${file} for these files:\n${failures.join('\n')}`); } if (unexpectedPasses.length > 0) { - const file = path.join('test', 'wpt', 'status', `${this.path}.json`); + const file = path.join('test', 'wpt', 'status', `${this.path}.js`); throw new Error( `Found ${unexpectedPasses.length} unexpected passes. ` + `Consider updating ${file} for these files:\n${unexpectedPasses.join('\n')}`); diff --git a/test/wpt/README.md b/test/wpt/README.md index 39f59d44060e3a..da4758b76e645e 100644 --- a/test/wpt/README.md +++ b/test/wpt/README.md @@ -5,7 +5,7 @@ The tests here are drivers for running the [Web Platform Tests][]. See [`test/fixtures/wpt/README.md`][] for a hash of the last updated WPT commit for each module being covered here. -See the json files in [the `status` folder](./status) for prerequisites, +See the WPT status files in [the `status` folder](./status) for prerequisites, expected failures, and support status for specific tests in each module. Currently there are still some Web Platform Tests titled `test-whatwg-*` @@ -20,14 +20,14 @@ This folder covers the tests that have been migrated. ### 1. Create a status file -For example, to add the URL tests, add a `test/wpt/status/url.json` file. +For example, to add the URL tests, add a `test/wpt/status/url.js` file. -In the beginning, it's fine to leave an empty object `{}` in the file if -it's not yet clear how compliant the implementation is, +In the beginning, it's fine to export an empty object `module.exports = {};` +in the file if it's not yet clear how compliant the implementation is, the requirements and expected failures can be figured out in a later step when the tests are run for the first time. -See [Format of a status JSON file](#status-format) for details. +See [Format of a status file](#status-format) for details. ### 2. Pull the WPT files @@ -43,6 +43,8 @@ $ git node wpt url For example, for the URL tests, add a file `test/wpt/test-url.js`: + + ```js 'use strict'; @@ -84,22 +86,26 @@ node test/wpt/test-url.js url-searchparams.any.js ``` If there are any failures, update the corresponding status file -(in this case, `test/wpt/status/url.json`) to make the test pass. +(in this case, `test/wpt/status/url.js`) to make the test pass. For example, to mark `url/url-searchparams.any.js` as expected to fail, -add this to `test/wpt/status/url.json`: - -```json - "url-searchparams.any.js": { - "fail": { - "expected": [ - "test name in the WPT test case, e.g. second argument passed to test()" - ] - } - } +add this to the `test/wpt/status/url.js` exported object: + + + +```js +module.exports = { + 'url-searchparams.any.js': { + fail: { + expected: [ + 'test name in the WPT test case, e.g. second argument passed to test()', + ], + }, + }, +}; ``` -See [Format of a status JSON file](#status-format) for details. +See [Format of a status file](#status-format) for details. ### 5. Commit the changes and submit a Pull Request @@ -137,7 +143,7 @@ Given a module, the `WPTRunner` class in [`test/common/wpt`](../common/wpt.js) loads: * `.js` test files (for example, `test/common/wpt/url/*.js` for `url`) -* Status file (for example, `test/wpt/status/url.json` for `url`) +* Status file (for example, `test/wpt/status/url.js` for `url`) * The WPT harness Then, for each test, it creates a worker thread with the globals and mocks, @@ -148,32 +154,37 @@ expected failures. -## Format of a status JSON file +## Format of a status file -```text -{ - "something.scope.js": { // the file name + + +```js +module.exports = { + 'something.scope.js': { // the file name // Optional: If the requirement is not met, this test will be skipped - "requires": ["small-icu"], // supports: "small-icu", "full-icu" + requires: ['small-icu'], // supports: 'small-icu', 'full-icu' // Optional: the test will be skipped with the reason printed - "skip": "explain why we cannot run a test that's supposed to pass", + skip: "explaination why we cannot run a test that's supposed to pass", // Optional: failing tests - "fail": { - "note": "You may leave an optional arbitrary note e.g. with TODOs", - "expected": [ - "test name in the WPT test case, e.g. second argument passed to test()", - "another test name" + fail: { + expected: [ + 'test name in the WPT test case, e.g. second argument passed to test()', + 'another test name', ], - "flaky": [ - "flaky test name" - ] - } - } -} + flaky: [ + 'flaky test name', + ], + }, + }, +}; ``` +You may automatically format the files by running `make lint-js-fix`. The lint +rules are set such that adding or removing expected failures is unlikely to +conflict with other updates. + A test may have to be skipped because it depends on another irrelevant Web API, or certain harness has not been ported in our test runner yet. In that case it needs to be marked with `skip` instead of `fail`. diff --git a/test/wpt/status/.eslintrc.yaml b/test/wpt/status/.eslintrc.yaml new file mode 100644 index 00000000000000..2fe443de03d7fe --- /dev/null +++ b/test/wpt/status/.eslintrc.yaml @@ -0,0 +1,9 @@ +## WPT Status files linter rules + +rules: + array-element-newline: [error, always] + array-bracket-newline: [error, always] + node-core/required-modules: [off] + node-core/require-common-first: [off] + quote-props: [error, as-needed] + max-len: [off] diff --git a/test/wpt/status/FileAPI/blob.js b/test/wpt/status/FileAPI/blob.js new file mode 100644 index 00000000000000..953ea2a1508662 --- /dev/null +++ b/test/wpt/status/FileAPI/blob.js @@ -0,0 +1,49 @@ +'use strict'; + +module.exports = { + 'Blob-constructor-dom.window.js': { + skip: 'Depends on DOM API', + }, + 'Blob-constructor.any.js': { + fail: { + note: 'Depends on File API', + expected: [ + 'A plain object with @@iterator should be treated as a sequence for the blobParts argument.', + 'A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.', + 'A String object should be treated as a sequence for the blobParts argument.', + 'A Uint8Array object should be treated as a sequence for the blobParts argument.', + 'Getters and value conversions should happen in order until an exception is thrown.', + 'Changes to the blobParts array should be reflected in the returned Blob (pop).', + 'Changes to the blobParts array should be reflected in the returned Blob (unshift).', + 'ToString should be called on elements of the blobParts array.', + 'ArrayBuffer elements of the blobParts array should be supported.', + 'Passing typed arrays as elements of the blobParts array should work.', + 'Passing a Float64Array as element of the blobParts array should work.', + 'Array with two blobs', + 'Array with two buffers', + 'Array with two bufferviews', + 'Array with mixed types', + 'options properties should be accessed in lexicographic order.', + 'Arguments should be evaluated from left to right.', + 'Passing null (index 0) for options should use the defaults.', + 'Passing null (index 0) for options should use the defaults (with newlines).', + 'Passing undefined (index 1) for options should use the defaults.', + 'Passing undefined (index 1) for options should use the defaults (with newlines).', + 'Passing object "[object Object]" (index 2) for options should use the defaults.', + 'Passing object "[object Object]" (index 2) for options should use the defaults (with newlines).', + 'Passing object "[object Object]" (index 3) for options should use the defaults.', + 'Passing object "[object Object]" (index 3) for options should use the defaults (with newlines).', + 'Passing object "/regex/" (index 4) for options should use the defaults.', + 'Passing object "/regex/" (index 4) for options should use the defaults (with newlines).', + 'Passing function "function() {}" (index 5) for options should use the defaults.', + 'Passing function "function() {}" (index 5) for options should use the defaults (with newlines).', + ], + }, + }, + 'Blob-in-worker.worker.js': { + skip: 'Depends on Web Workers API', + }, + 'Blob-slice.any.js': { + skip: 'Depends on File API', + }, +}; diff --git a/test/wpt/status/FileAPI/blob.json b/test/wpt/status/FileAPI/blob.json deleted file mode 100644 index 902ac232dd4872..00000000000000 --- a/test/wpt/status/FileAPI/blob.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "Blob-constructor-dom.window.js": { - "skip": "Depends on DOM API" - }, - "Blob-constructor.any.js": { - "fail": { - "note": "Depends on File API", - "expected": [ - "A plain object with @@iterator should be treated as a sequence for the blobParts argument.", - "A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.", - "A String object should be treated as a sequence for the blobParts argument.", - "A Uint8Array object should be treated as a sequence for the blobParts argument.", - "Getters and value conversions should happen in order until an exception is thrown.", - "Changes to the blobParts array should be reflected in the returned Blob (pop).", - "Changes to the blobParts array should be reflected in the returned Blob (unshift).", - "ToString should be called on elements of the blobParts array.", - "ArrayBuffer elements of the blobParts array should be supported.", - "Passing typed arrays as elements of the blobParts array should work.", - "Passing a Float64Array as element of the blobParts array should work.", - "Array with two blobs", - "Array with two buffers", - "Array with two bufferviews", - "Array with mixed types", - "options properties should be accessed in lexicographic order.", - "Arguments should be evaluated from left to right.", - "Passing null (index 0) for options should use the defaults.", - "Passing null (index 0) for options should use the defaults (with newlines).", - "Passing undefined (index 1) for options should use the defaults.", - "Passing undefined (index 1) for options should use the defaults (with newlines).", - "Passing object \"[object Object]\" (index 2) for options should use the defaults.", - "Passing object \"[object Object]\" (index 2) for options should use the defaults (with newlines).", - "Passing object \"[object Object]\" (index 3) for options should use the defaults.", - "Passing object \"[object Object]\" (index 3) for options should use the defaults (with newlines).", - "Passing object \"/regex/\" (index 4) for options should use the defaults.", - "Passing object \"/regex/\" (index 4) for options should use the defaults (with newlines).", - "Passing function \"function() {}\" (index 5) for options should use the defaults.", - "Passing function \"function() {}\" (index 5) for options should use the defaults (with newlines)." - ] - } - }, - "Blob-in-worker.worker.js": { - "skip": "Depends on Web Workers API" - }, - "Blob-slice.any.js": { - "skip": "Depends on File API" - } -} diff --git a/test/wpt/status/FileAPI/file.js b/test/wpt/status/FileAPI/file.js new file mode 100644 index 00000000000000..7098352ae19df9 --- /dev/null +++ b/test/wpt/status/FileAPI/file.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = { + 'Worker-read-file-constructor.worker.js': { + skip: true, + }, + 'send-file-formdata-punctuation.any.js': { + skip: true, + }, + 'send-file-formdata-utf-8.any.js': { + skip: true, + }, + 'send-file-formdata.any.js': { + skip: true, + }, + 'send-file-formdata-controls.any.js': { + skip: true, + }, +}; diff --git a/test/wpt/status/FileAPI/file.json b/test/wpt/status/FileAPI/file.json deleted file mode 100644 index 6b50bcec1539e3..00000000000000 --- a/test/wpt/status/FileAPI/file.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "Worker-read-file-constructor.worker.js": { - "skip": true - }, - "send-file-formdata-punctuation.any.js": { - "skip": true - }, - "send-file-formdata-utf-8.any.js": { - "skip": true - }, - "send-file-formdata.any.js": { - "skip": true - }, - "send-file-formdata-controls.any.js": { - "skip": true - } -} diff --git a/test/wpt/status/WebCryptoAPI.js b/test/wpt/status/WebCryptoAPI.js new file mode 100644 index 00000000000000..9a225f79d19c88 --- /dev/null +++ b/test/wpt/status/WebCryptoAPI.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + 'algorithm-discards-context.https.window.js': { + skip: 'Not relevant in Node.js context', + }, + 'historical.any.js': { + skip: 'Not relevant in Node.js context', + }, +}; diff --git a/test/wpt/status/WebCryptoAPI.json b/test/wpt/status/WebCryptoAPI.json deleted file mode 100644 index 9f9ba93240be25..00000000000000 --- a/test/wpt/status/WebCryptoAPI.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "algorithm-discards-context.https.window.js": { - "skip": "Not relevant in Node.js context" - }, - "historical.any.js": { - "skip": "Not relevant in Node.js context" - } -} diff --git a/test/wpt/status/console.js b/test/wpt/status/console.js new file mode 100644 index 00000000000000..2d78687c086a59 --- /dev/null +++ b/test/wpt/status/console.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + 'idlharness.any.js': { + fail: { + flaky: [ + 'console namespace: operation assert(optional boolean, any...)', + 'console namespace: operation table(optional any, optional sequence)', + 'console namespace: operation dir(optional any, optional object?)', + ], + }, + }, +}; diff --git a/test/wpt/status/console.json b/test/wpt/status/console.json deleted file mode 100644 index 7f8af86a083fde..00000000000000 --- a/test/wpt/status/console.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "idlharness.any.js": { - "fail": { - "flaky": [ - "console namespace: operation assert(optional boolean, any...)", - "console namespace: operation table(optional any, optional sequence)", - "console namespace: operation dir(optional any, optional object?)" - ] - } - } -} diff --git a/test/wpt/status/dom/abort.js b/test/wpt/status/dom/abort.js new file mode 100644 index 00000000000000..8b46fbbaadf6b0 --- /dev/null +++ b/test/wpt/status/dom/abort.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = {}; diff --git a/test/wpt/status/dom/abort.json b/test/wpt/status/dom/abort.json deleted file mode 100644 index 0967ef424bce67..00000000000000 --- a/test/wpt/status/dom/abort.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/wpt/status/dom/events.js b/test/wpt/status/dom/events.js new file mode 100644 index 00000000000000..a5f4a787af880d --- /dev/null +++ b/test/wpt/status/dom/events.js @@ -0,0 +1,37 @@ +'use strict'; + +module.exports = { + 'AddEventListenerOptions-passive.any.js': { + fail: { + expected: [ + 'preventDefault should be ignored if-and-only-if the passive option is true', + 'returnValue should be ignored if-and-only-if the passive option is true', + 'passive behavior of one listener should be unaffected by the presence of other listeners', + ], + }, + }, + 'Event-dispatch-listener-order.window.js': { + skip: 'document is not defined', + }, + 'EventListener-addEventListener.sub.window.js': { + skip: 'document is not defined', + }, + 'EventTarget-removeEventListener.any.js': { + skip: 'globalThis.removeEventListener is not a function', + }, + 'event-global-extra.window.js': { + skip: 'document is not defined', + }, + 'event-global-set-before-handleEvent-lookup.window.js': { + skip: 'window is not defined', + }, + 'event-global.worker.js': { + skip: 'importScripts is not defined', + }, + 'legacy-pre-activation-behavior.window.js': { + skip: 'document is not defined', + }, + 'relatedTarget.window.js': { + skip: 'document is not defined', + }, +}; diff --git a/test/wpt/status/dom/events.json b/test/wpt/status/dom/events.json deleted file mode 100644 index 90825d76a358d6..00000000000000 --- a/test/wpt/status/dom/events.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "AddEventListenerOptions-passive.any.js": { - "fail": { - "expected": [ - "preventDefault should be ignored if-and-only-if the passive option is true", - "returnValue should be ignored if-and-only-if the passive option is true", - "passive behavior of one listener should be unaffected by the presence of other listeners" - ] - } - }, - "Event-dispatch-listener-order.window.js": { - "skip": "document is not defined" - }, - "EventListener-addEventListener.sub.window.js": { - "skip": "document is not defined" - }, - "EventTarget-removeEventListener.any.js": { - "skip": "globalThis.removeEventListener is not a function" - }, - "event-global-extra.window.js": { - "skip": "document is not defined" - }, - "event-global-set-before-handleEvent-lookup.window.js": { - "skip": "window is not defined" - }, - "event-global.worker.js": { - "skip": "importScripts is not defined" - }, - "legacy-pre-activation-behavior.window.js": { - "skip": "document is not defined" - }, - "relatedTarget.window.js": { - "skip": "document is not defined" - } -} diff --git a/test/wpt/status/encoding.js b/test/wpt/status/encoding.js new file mode 100644 index 00000000000000..c4dd3f101ba296 --- /dev/null +++ b/test/wpt/status/encoding.js @@ -0,0 +1,145 @@ +'use strict'; + +module.exports = { + 'api-basics.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-fatal-streaming.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-fatal.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-ignorebom.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-streaming.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-utf16-surrogates.any.js': { + requires: [ + 'small-icu', + ], + }, + 'iso-2022-jp-decoder.any.js': { + requires: [ + 'full-icu', + ], + skip: 'iso-2022-jp decoder state handling bug: https://encoding.spec.whatwg.org/#iso-2022-jp-decoder', + }, + 'textdecoder-byte-order-marks.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-fatal-single-byte.any.js': { + requires: [ + 'full-icu', + ], + skip: 'The iso-8859-16 encoding is not supported', + }, + 'textdecoder-labels.any.js': { + requires: [ + 'full-icu', + ], + skip: 'The iso-8859-16 encoding is not supported', + }, + 'textencoder-constructor-non-utf.any.js': { + requires: [ + 'full-icu', + ], + skip: 'The iso-8859-16 encoding is not supported', + }, + 'idlharness.any.js': { + skip: 'No implementation of TextDecoderStream and TextEncoderStream', + }, + 'replacement-encodings.any.js': { + skip: 'decoding-helpers.js needs XMLHttpRequest', + }, + 'unsupported-encodings.any.js': { + skip: 'decoding-helpers.js needs XMLHttpRequest', + }, + 'streams/decode-ignore-bom.any.js': { + requires: [ + 'small-icu', + ], + }, + 'streams/realms.window.js': { + skip: 'window is not defined', + }, + 'streams/decode-attributes.any.js': { + requires: [ + 'full-icu', + ], + }, + 'streams/decode-incomplete-input.any.js': { + requires: [ + 'small-icu', + ], + }, + 'streams/decode-utf8.any.js': { + requires: [ + 'small-icu', + ], + }, + 'streams/decode-bad-chunks.any.js': { + fail: { + expected: [ + 'chunk of type undefined should error the stream', + ], + }, + }, + 'streams/decode-non-utf8.any.js': { + requires: [ + 'full-icu', + ], + }, + 'encodeInto.any.js': { + requires: [ + 'small-icu', + ], + }, + 'textdecoder-copy.any.js': { + requires: [ + 'small-icu', + ], + }, + 'legacy-mb-schinese/gbk/gbk-decoder.any.js': { + requires: [ + 'full-icu', + ], + skip: 'The gbk encoding is not supported', + }, + 'legacy-mb-schinese/gb18030/gb18030-decoder.any.js': { + requires: [ + 'full-icu', + ], + skip: 'The gb18030 encoding is not supported', + }, + 'textdecoder-arguments.any.js': { + requires: [ + 'small-icu', + ], + }, + 'single-byte-decoder.window.js': { + skip: 'document is not defined', + }, + 'textdecoder-eof.any.js': { + requires: [ + 'small-icu', + ], + }, + 'unsupported-labels.window.js': { + skip: 'document is not defined', + }, +}; diff --git a/test/wpt/status/encoding.json b/test/wpt/status/encoding.json deleted file mode 100644 index f39fc321f2a210..00000000000000 --- a/test/wpt/status/encoding.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "api-basics.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-fatal-streaming.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-fatal.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-ignorebom.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-streaming.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-utf16-surrogates.any.js": { - "requires": ["small-icu"] - }, - "iso-2022-jp-decoder.any.js": { - "requires": ["full-icu"], - "skip": "iso-2022-jp decoder state handling bug: https://encoding.spec.whatwg.org/#iso-2022-jp-decoder" - }, - "textdecoder-byte-order-marks.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-fatal-single-byte.any.js": { - "requires": ["full-icu"], - "skip": "The iso-8859-16 encoding is not supported" - }, - "textdecoder-labels.any.js": { - "requires": ["full-icu"], - "skip": "The iso-8859-16 encoding is not supported" - }, - "textencoder-constructor-non-utf.any.js": { - "requires": ["full-icu"], - "skip": "The iso-8859-16 encoding is not supported" - }, - "idlharness.any.js": { - "skip": "No implementation of TextDecoderStream and TextEncoderStream" - }, - "replacement-encodings.any.js": { - "skip": "decoding-helpers.js needs XMLHttpRequest" - }, - "unsupported-encodings.any.js": { - "skip": "decoding-helpers.js needs XMLHttpRequest" - }, - "streams/decode-ignore-bom.any.js": { - "requires": ["small-icu"] - }, - "streams/realms.window.js": { - "skip": "window is not defined" - }, - "streams/decode-attributes.any.js": { - "requires": ["full-icu"] - }, - "streams/decode-incomplete-input.any.js": { - "requires": ["small-icu"] - }, - "streams/decode-utf8.any.js": { - "requires": ["small-icu"] - }, - "streams/decode-bad-chunks.any.js": { - "fail": { - "expected": [ - "chunk of type undefined should error the stream" - ] - } - }, - "streams/decode-non-utf8.any.js": { - "requires": ["full-icu"] - }, - "encodeInto.any.js": { - "requires": ["small-icu"] - }, - "textdecoder-copy.any.js": { - "requires": ["small-icu"] - }, - "legacy-mb-schinese/gbk/gbk-decoder.any.js": { - "requires": ["full-icu"], - "skip": "The gbk encoding is not supported" - }, - "legacy-mb-schinese/gb18030/gb18030-decoder.any.js": { - "requires": ["full-icu"], - "skip": "The gb18030 encoding is not supported" - }, - "textdecoder-arguments.any.js": { - "requires": ["small-icu"] - }, - "single-byte-decoder.window.js": { - "skip": "document is not defined" - }, - "textdecoder-eof.any.js": { - "requires": ["small-icu"] - }, - "unsupported-labels.window.js": { - "skip": "document is not defined" - } -} diff --git a/test/wpt/status/hr-time.js b/test/wpt/status/hr-time.js new file mode 100644 index 00000000000000..362a811ef5ac8a --- /dev/null +++ b/test/wpt/status/hr-time.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + 'window-worker-timeOrigin.window.js': { + skip: 'depends on URL.createObjectURL(blob)', + }, +}; diff --git a/test/wpt/status/hr-time.json b/test/wpt/status/hr-time.json deleted file mode 100644 index 973e32b298a557..00000000000000 --- a/test/wpt/status/hr-time.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "window-worker-timeOrigin.window.js": { - "skip": "depends on URL.createObjectURL(blob)" - } -} diff --git a/test/wpt/status/html/webappapis/atob.js b/test/wpt/status/html/webappapis/atob.js new file mode 100644 index 00000000000000..8b46fbbaadf6b0 --- /dev/null +++ b/test/wpt/status/html/webappapis/atob.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = {}; diff --git a/test/wpt/status/html/webappapis/atob.json b/test/wpt/status/html/webappapis/atob.json deleted file mode 100644 index 2c63c0851048d8..00000000000000 --- a/test/wpt/status/html/webappapis/atob.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/test/wpt/status/html/webappapis/microtask-queuing.js b/test/wpt/status/html/webappapis/microtask-queuing.js new file mode 100644 index 00000000000000..58a06937aad40c --- /dev/null +++ b/test/wpt/status/html/webappapis/microtask-queuing.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + 'queue-microtask-exceptions.any.js': { + skip: 'Node.js does not have a global addEventListener function', + }, + 'queue-microtask.window.js': { + skip: 'MutationObserver is not implemented', + }, +}; diff --git a/test/wpt/status/html/webappapis/microtask-queuing.json b/test/wpt/status/html/webappapis/microtask-queuing.json deleted file mode 100644 index 99f9c623c7f90e..00000000000000 --- a/test/wpt/status/html/webappapis/microtask-queuing.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "queue-microtask-exceptions.any.js": { - "skip": "Node.js does not have a global addEventListener function" - }, - "queue-microtask.window.js": { - "skip": "MutationObserver is not implemented" - } -} diff --git a/test/wpt/status/html/webappapis/structured-clone.js b/test/wpt/status/html/webappapis/structured-clone.js new file mode 100644 index 00000000000000..8775ebeb0d6e61 --- /dev/null +++ b/test/wpt/status/html/webappapis/structured-clone.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = { + 'structured-clone.any.js': { + fail: { + expected: [ + 'File basic', + ], + }, + }, +}; diff --git a/test/wpt/status/html/webappapis/structured-clone.json b/test/wpt/status/html/webappapis/structured-clone.json deleted file mode 100644 index 873f2f9b46eb03..00000000000000 --- a/test/wpt/status/html/webappapis/structured-clone.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "structured-clone.any.js": { - "fail": { - "expected": ["File basic"] - } - } -} diff --git a/test/wpt/status/html/webappapis/timers.js b/test/wpt/status/html/webappapis/timers.js new file mode 100644 index 00000000000000..e80cdc1de3a4ad --- /dev/null +++ b/test/wpt/status/html/webappapis/timers.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + 'negative-settimeout.any.js': { + skip: 'unreliable in Node.js; Refs: https://github.com/nodejs/node/issues/37672', + }, +}; diff --git a/test/wpt/status/html/webappapis/timers.json b/test/wpt/status/html/webappapis/timers.json deleted file mode 100644 index 21e77a089d5ca7..00000000000000 --- a/test/wpt/status/html/webappapis/timers.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "negative-settimeout.any.js": { - "skip": "unreliable in Node.js; Refs: https://github.com/nodejs/node/issues/37672" - } -} diff --git a/test/wpt/status/performance-timeline.js b/test/wpt/status/performance-timeline.js new file mode 100644 index 00000000000000..9eafc155741e90 --- /dev/null +++ b/test/wpt/status/performance-timeline.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + 'case-sensitivity.any.js': { + fail: { + note: 'self.location is not available', + expected: [ + 'getEntriesByName values are case sensitive', + ], + }, + }, + 'webtiming-resolution.any.js': { + skip: 'flaky', + }, +}; diff --git a/test/wpt/status/performance-timeline.json b/test/wpt/status/performance-timeline.json deleted file mode 100644 index 9a297e641437df..00000000000000 --- a/test/wpt/status/performance-timeline.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "case-sensitivity.any.js": { - "fail": { - "note": "self.location is not available", - "expected": [ - "getEntriesByName values are case sensitive" - ] - } - }, - "webtiming-resolution.any.js": { - "skip": "flaky" - } -} diff --git a/test/wpt/status/resource-timing.js b/test/wpt/status/resource-timing.js new file mode 100644 index 00000000000000..7ab24224f06dbd --- /dev/null +++ b/test/wpt/status/resource-timing.js @@ -0,0 +1,25 @@ +'use strict'; + +module.exports = { + 'cors-preflight.any.js': { + skip: 'Browser-specific test', + }, + 'resource_nested_dedicated_worker.worker.js': { + skip: 'Browser-specific test', + }, + 'resource_timing.worker.js': { + skip: 'Browser-specific test', + }, + 'sizes-cache.any.js': { + skip: 'Browser-specific test', + }, + 'sizes-redirect.any.js': { + skip: 'Browser-specific test', + }, + 'supported_resource_type.any.js': { + skip: 'Browser-specific test', + }, + 'buffered-flag.any.js': { + skip: 'Browser-specific test', + }, +}; diff --git a/test/wpt/status/resource-timing.json b/test/wpt/status/resource-timing.json deleted file mode 100644 index 22f21cfe48d7fe..00000000000000 --- a/test/wpt/status/resource-timing.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "cors-preflight.any.js": { - "skip": "Browser-specific test" - }, - "resource_nested_dedicated_worker.worker.js": { - "skip": "Browser-specific test" - }, - "resource_timing.worker.js": { - "skip": "Browser-specific test" - }, - "sizes-cache.any.js": { - "skip": "Browser-specific test" - }, - "sizes-redirect.any.js": { - "skip": "Browser-specific test" - }, - "supported_resource_type.any.js": { - "skip": "Browser-specific test" - }, - "buffered-flag.any.js": { - "skip": "Browser-specific test" - } -} diff --git a/test/wpt/status/streams.js b/test/wpt/status/streams.js new file mode 100644 index 00000000000000..9e8650b96c5bcf --- /dev/null +++ b/test/wpt/status/streams.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = { + 'queuing-strategies-size-function-per-global.window.js': { + skip: 'Browser-specific test', + }, + 'readable-streams/cross-realm-crash.window.js': { + skip: 'Browser-specific test', + }, + 'transferable/deserialize-error.window.js': { + skip: 'Browser-specific test', + }, + 'transferable/transfer-with-messageport.window.js': { + skip: 'Browser-specific test', + }, +}; diff --git a/test/wpt/status/streams.json b/test/wpt/status/streams.json deleted file mode 100644 index 9899c581d9f96e..00000000000000 --- a/test/wpt/status/streams.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "queuing-strategies-size-function-per-global.window.js": { - "skip": "Browser-specific test" - }, - "readable-streams/cross-realm-crash.window.js": { - "skip": "Browser-specific test" - }, - "transferable/deserialize-error.window.js": { - "skip": "Browser-specific test" - }, - "transferable/transfer-with-messageport.window.js": { - "skip": "Browser-specific test" - } -} diff --git a/test/wpt/status/url.js b/test/wpt/status/url.js new file mode 100644 index 00000000000000..69d6916ad90fba --- /dev/null +++ b/test/wpt/status/url.js @@ -0,0 +1,43 @@ +'use strict'; + +module.exports = { + 'toascii.window.js': { + requires: [ + 'small-icu', + ], + }, + 'percent-encoding.window.js': { + requires: [ + 'small-icu', + ], + skip: 'TODO: port from .window.js', + }, + 'historical.any.js': { + requires: [ + 'small-icu', + ], + }, + 'urlencoded-parser.any.js': { + requires: [ + 'small-icu', + ], + }, + 'url-constructor.any.js': { + requires: [ + 'small-icu', + ], + }, + 'url-origin.any.js': { + requires: [ + 'small-icu', + ], + }, + 'url-setters.any.js': { + requires: [ + 'small-icu', + ], + }, + 'url-setters-a-area.window.js': { + skip: 'already tested in url-setters.any.js', + }, +}; diff --git a/test/wpt/status/url.json b/test/wpt/status/url.json deleted file mode 100644 index a1c90f210506db..00000000000000 --- a/test/wpt/status/url.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "toascii.window.js": { - "requires": ["small-icu"] - }, - "percent-encoding.window.js": { - "requires": ["small-icu"], - "skip": "TODO: port from .window.js" - }, - "historical.any.js": { - "requires": ["small-icu"] - }, - "urlencoded-parser.any.js": { - "requires": ["small-icu"] - }, - "url-constructor.any.js": { - "requires": ["small-icu"] - }, - "url-origin.any.js": { - "requires": ["small-icu"] - }, - "url-setters.any.js": { - "requires": ["small-icu"] - }, - "url-setters-a-area.window.js": { - "skip": "already tested in url-setters.any.js" - } -} diff --git a/test/wpt/status/user-timing.js b/test/wpt/status/user-timing.js new file mode 100644 index 00000000000000..a83bbf620ad38f --- /dev/null +++ b/test/wpt/status/user-timing.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + 'invoke_with_timing_attributes.worker.js': { + skip: 'importScripts not supported', + }, + 'performance-measure-invalid.worker.js': { + skip: 'importScripts not supported', + }, +}; diff --git a/test/wpt/status/user-timing.json b/test/wpt/status/user-timing.json deleted file mode 100644 index 6e2b6e276ccda0..00000000000000 --- a/test/wpt/status/user-timing.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "invoke_with_timing_attributes.worker.js": { - "skip": "importScripts not supported" - }, - "performance-measure-invalid.worker.js": { - "skip": "importScripts not supported" - } -} diff --git a/test/wpt/status/wasm/webapi.js b/test/wpt/status/wasm/webapi.js new file mode 100644 index 00000000000000..d7301379ab1af7 --- /dev/null +++ b/test/wpt/status/wasm/webapi.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = { + 'historical.any.js': { + skip: 'indexedDB is not defined', + }, + 'origin.sub.any.js': { + skip: 'CORS not implemented', + }, + 'abort.any.js': { + skip: 'WPTRunner does not support fetch()', + }, + 'contenttype.any.js': { + skip: 'WPTRunner does not support fetch()', + }, + 'idlharness.any.js': { + skip: 'not configured', + }, + 'status.any.js': { + skip: 'WPTRunner does not support fetch()', + }, +}; diff --git a/test/wpt/status/wasm/webapi.json b/test/wpt/status/wasm/webapi.json deleted file mode 100644 index 6328e55dc18bc9..00000000000000 --- a/test/wpt/status/wasm/webapi.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "historical.any.js": { - "skip": "indexedDB is not defined" - }, - "origin.sub.any.js": { - "skip": "CORS not implemented" - }, - "abort.any.js": { - "skip": "WPTRunner does not support fetch()" - }, - "contenttype.any.js": { - "skip": "WPTRunner does not support fetch()" - }, - "idlharness.any.js": { - "skip": "not configured" - }, - "status.any.js": { - "skip": "WPTRunner does not support fetch()" - } -} diff --git a/test/wpt/status/webidl/ecmascript-binding/es-exceptions.js b/test/wpt/status/webidl/ecmascript-binding/es-exceptions.js new file mode 100644 index 00000000000000..8b46fbbaadf6b0 --- /dev/null +++ b/test/wpt/status/webidl/ecmascript-binding/es-exceptions.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = {}; diff --git a/test/wpt/status/webidl/ecmascript-binding/es-exceptions.json b/test/wpt/status/webidl/ecmascript-binding/es-exceptions.json deleted file mode 100644 index 0967ef424bce67..00000000000000 --- a/test/wpt/status/webidl/ecmascript-binding/es-exceptions.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/test/wpt/status/webmessaging/broadcastchannel.js b/test/wpt/status/webmessaging/broadcastchannel.js new file mode 100644 index 00000000000000..192b101d007992 --- /dev/null +++ b/test/wpt/status/webmessaging/broadcastchannel.js @@ -0,0 +1,30 @@ +'use strict'; + +module.exports = { + 'basics.any.js': { + fail: { + expected: [ + 'postMessage results in correct event', + 'messages are delivered in port creation order', + ], + flaky: [ + 'Closing a channel in onmessage prevents already queued tasks from firing onmessage events', + ], + }, + }, + 'interface.any.js': { + fail: { + expected: [ + 'postMessage after close should throw', + 'postMessage should throw InvalidStateError after close, even with uncloneable data', + ], + }, + }, + 'origin.window.js': { + fail: { + expected: [ + 'Serialization of BroadcastChannel origin', + ], + }, + }, +}; diff --git a/test/wpt/status/webmessaging/broadcastchannel.json b/test/wpt/status/webmessaging/broadcastchannel.json deleted file mode 100644 index b6ee1b6e0db194..00000000000000 --- a/test/wpt/status/webmessaging/broadcastchannel.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "basics.any.js": { - "fail": { - "expected": [ - "postMessage results in correct event", - "messages are delivered in port creation order" - ], - "flaky": [ - "Closing a channel in onmessage prevents already queued tasks from firing onmessage events" - ] - } - }, - "interface.any.js": { - "fail": { - "expected": [ - "postMessage after close should throw", - "postMessage should throw InvalidStateError after close, even with uncloneable data" - ] - } - }, - "origin.window.js": { - "fail": { - "expected": [ - "Serialization of BroadcastChannel origin" - ] - } - } -}