summaryrefslogtreecommitdiff
path: root/test/wpt
AgeCommit message (Collapse)Author
2019-11-05encoding: make TextDecoder handle BOM correctlyAnna Henningsen
Do not accept the BOM if it comes from a different encoding, and only discard the BOM after it has actually been read (including when it is spread over multiple chunks in streaming mode). Fixes: https://github.com/nodejs/node/issues/25315 PR-URL: https://github.com/nodejs/node/pull/30132 Reviewed-By: Gus Caplan <me@gus.host>
2019-10-10test: remove unnecessary --expose-internals flagsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/29886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-17doc: update list style in misc README docsRich Trott
To confirm with upcoming markdown lint rule, use `*` for unordered lists. PR-URL: https://github.com/nodejs/node/pull/29594 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-13util: add encodeInto to TextEncoderAnna Henningsen
Add function encodeInto to TextEncoder, and add MessageChannel to the encodeInto.any.js test. Fixes: https://github.com/nodejs/node/issues/28851 Fixes: https://github.com/nodejs/node/issues/26904 Refs: https://github.com/nodejs/node/pull/28862 Co-authored-by: AtticusYang <yyongtai@163.com> PR-URL: https://github.com/nodejs/node/pull/29524 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-09src: expose DOMException to internalBinding('message') for testingJoyee Cheung
Instead of using a hack to get it in the test. PR-URL: https://github.com/nodejs/node/pull/28072 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-28test: expect wpt/encoding/encodeInto.any.js to failJoyee Cheung
Since we do not implement TextEncoder.prototype.encodeInto PR-URL: https://github.com/nodejs/node/pull/27860 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-28test: expect wpt/encoding/streams to failJoyee Cheung
Since we do not implement TextDecoderStream or TextEncoderStream. PR-URL: https://github.com/nodejs/node/pull/27860 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-05-10test: remove unneeded `--expose-internals`Rich Trott
test/wpt/test-timers.js does not appear to need the `--expose-internals` flag. Remove it. PR-URL: https://github.com/nodejs/node/pull/27608 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-03-15src,lib: make DOMException available in all ContextsAnna Henningsen
This allows using `DOMException` from Node.js code for any `vm.Context`. PR-URL: https://github.com/nodejs/node/pull/26497 Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01test: run html/webappapis/timers WPTJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/25618 Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-25test: run html/webappapis/microtask-queuing WPTJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/25616 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
2019-01-10test: use WPT runner to run encoding testsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/25321 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-10test: support more icu requirements in the WPT status fileJoyee Cheung
Support `small-icu` and `full-icu` requirements, where `full-icu` implies `small-icu`. PR-URL: https://github.com/nodejs/node/pull/25321 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-10test: pull enconding WPT test fixturesJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/25321 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-09worker: remove `--experimental-worker` flagAnna Henningsen
Having an experimental feature behind a flag makes change if we are expecting significant breaking changes to its API. Since the Worker API has been essentially stable since its initial introduction, and no noticeable doubt about possibly not keeping the feature around has been voiced, removing the flag and thereby reducing the barrier to experimentation, and consequently receiving feedback on the implementation, seems like a good idea. PR-URL: https://github.com/nodejs/node/pull/25361 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-12-14test: remove reference to whatwg in file names under test/wptJoyee Cheung
WPT covers standards in both W3C and WHATWG, as such it would be strange to make this disparity explicit in our file names (e.g. when testing standards that are solely in W3C, like performance-timeline). Remove the reference to WHATWG will also make the file names shorter. PR-URL: https://github.com/nodejs/node/pull/24826 Refs: https://github.com/nodejs/node/issues/24823 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-11-20test: use Worker scope in WPTJoyee Cheung
Previously, we use the Window scope by default in our WPT test runner. When one of the test fails, the WPT harness would try to use document.getElementsByTagName() etc. to display the failure, which is not going to work for us. This patch switches the scope to DedicatedWorker and use our Worker implementation as a global - this does not test the Worker implementation per se, just tells the WPT harness to pass the results back to us via the callbacks we installed and not try to access a document. We may still need to use a Window scope when we try to run .window.js tests in the future, but for now we only run .any.js tests so it's fine to use a worker scope by default. PR-URL: https://github.com/nodejs/node/pull/24410 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-09test: initialize test/wpt to run URL and console .js testsJoyee Cheung
This patch: - Creates a new test suite `wpt` that can be used to run a subset of Web Platform Tests - Adds a `WPTRunner` in `test/common/wpt.js` that can run the WPT subset in `test/fixtures/wpt` with a vm and the WPT harness while taking the status file in `test/wpt/status` into account. Here we use a new format of status file (in JSON) to handle specific requirements (like ICU requirements) in the tests and to handle expected failures and TODOs. - Adds documentation on how the runner and the update automation works - Runs the WHATWG URL tests and the console tests with the new test runner. With this patch we eliminates the need of copy-pasting with manual modifications to update a large chunk of our WPT subset previously maintained in `test/parallel`. Now the tests run in `test/wpt` can be automatically updated with `git node wpt` without modifications by the actual WPT harness instead of our home-grown mock. There are still a few URL tests left that need to be migrated in the upstream to be placed in .js instead of .html - we currently still use the legacy harness mock in the test files. PR-URL: https://github.com/nodejs/node/pull/24035 Refs: https://github.com/nodejs/node/issues/23192 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>