From 0e873c3031363ffe5ea53d5956bf39a9c08377e2 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Fri, 18 Oct 2024 02:25:48 -0400 Subject: [PATCH] test: update `console` wpt PR-URL: https://github.com/nodejs/node/pull/55192 Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Ethan Arrowood --- test/fixtures/wpt/README.md | 2 +- .../wpt/console/console-countReset-logging-manual.html | 6 +++++- .../wpt/console/console-log-large-array.any.js | 8 ++++++++ test/fixtures/wpt/console/console-log-symbol.any.js | 10 ++++++++++ test/fixtures/wpt/versions.json | 2 +- 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/wpt/console/console-log-large-array.any.js create mode 100644 test/fixtures/wpt/console/console-log-symbol.any.js diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index fe5486edb75474..70075e77097cc1 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -12,7 +12,7 @@ Last update: - common: https://github.com/web-platform-tests/wpt/tree/dbd648158d/common - compression: https://github.com/web-platform-tests/wpt/tree/da8d6860b2/compression -- console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console +- console: https://github.com/web-platform-tests/wpt/tree/e48251b778/console - dom/abort: https://github.com/web-platform-tests/wpt/tree/0143fe244b/dom/abort - dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events - encoding: https://github.com/web-platform-tests/wpt/tree/1ac8deee08/encoding diff --git a/test/fixtures/wpt/console/console-countReset-logging-manual.html b/test/fixtures/wpt/console/console-countReset-logging-manual.html index 7fe01f50edbfa1..f0a9358fba5d74 100644 --- a/test/fixtures/wpt/console/console-countReset-logging-manual.html +++ b/test/fixtures/wpt/console/console-countReset-logging-manual.html @@ -24,21 +24,25 @@ console.count(); console.countReset(); console.count(); +console.countReset(); console.count(undefined); console.countReset(undefined); console.count(undefined); +console.countReset(undefined); console.count("default"); console.countReset("default"); console.count("default"); +console.countReset("default"); console.count({toString() {return "default"}}); console.countReset({toString() {return "default"}}); console.count({toString() {return "default"}}); +console.countReset({toString() {return "default"}}); console.count("a label"); -console.countReset(); +console.countReset("a label"); console.count("a label"); console.countReset("b"); // should produce a warning diff --git a/test/fixtures/wpt/console/console-log-large-array.any.js b/test/fixtures/wpt/console/console-log-large-array.any.js new file mode 100644 index 00000000000000..e5cb92d9d36d4a --- /dev/null +++ b/test/fixtures/wpt/console/console-log-large-array.any.js @@ -0,0 +1,8 @@ +// META: global=window,dedicatedworker,shadowrealm +"use strict"; +// https://console.spec.whatwg.org/ + +test(() => { + console.log(new Array(10000000).fill("x")); + console.log(new Uint8Array(10000000)); +}, "Logging large arrays works"); diff --git a/test/fixtures/wpt/console/console-log-symbol.any.js b/test/fixtures/wpt/console/console-log-symbol.any.js new file mode 100644 index 00000000000000..a2facb6c64e864 --- /dev/null +++ b/test/fixtures/wpt/console/console-log-symbol.any.js @@ -0,0 +1,10 @@ +// META: global=window,dedicatedworker,shadowrealm +"use strict"; +// https://console.spec.whatwg.org/ + +test(() => { + console.log(Symbol()); + console.log(Symbol("abc")); + console.log(Symbol.for("def")); + console.log(Symbol.isConcatSpreadable); +}, "Logging a symbol doesn't throw"); diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index bc907734cdb7c9..2821834ba60b33 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -8,7 +8,7 @@ "path": "compression" }, "console": { - "commit": "767ae354642bee1e4d90b28df4480475b9260e14", + "commit": "e48251b77834f9689e9df3f49b93b3387dee72d6", "path": "console" }, "dom/abort": {