Skip to content

Commit

Permalink
test: update console web platform tests
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#44100
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
anonrig authored and guangwong committed Jan 3, 2023
1 parent 6e17dfa commit 6a20cbb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run.
Last update:

- common: https://github.com/web-platform-tests/wpt/tree/03c5072aff/common
- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
- console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console
- dom/abort: https://github.com/web-platform-tests/wpt/tree/c49cafb491/dom/abort
- dom/events: https://github.com/web-platform-tests/wpt/tree/f8821adb28/dom/events
- encoding: https://github.com/web-platform-tests/wpt/tree/c1b24fce6e/encoding
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/wpt/console/console-is-a-namespace.any.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// META: global=window,dedicatedworker,shadowrealm
"use strict";
// https://heycam.github.io/webidl/#es-namespaces
// https://webidl.spec.whatwg.org/#es-namespaces
// https://console.spec.whatwg.org/#console-namespace

test(() => {
Expand Down
10 changes: 10 additions & 0 deletions test/fixtures/wpt/console/console-log-shadowrealm-manual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<mete charset=utf-8>
<title>Console Logging Manual Test</title>
<p>Open the console inside the developer tools. It should contain one entry saying "test passed".</p>
<script>
const sr = new ShadowRealm();
sr.evaluate(`
console.log("test passed");
`);
</script>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
// https://heycam.github.io/webidl/#es-namespaces
// https://webidl.spec.whatwg.org/#es-namespaces
// https://console.spec.whatwg.org/#console-namespace

test(() => {
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/wpt/console/console-tests-historical.any.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// META: global=window,dedicatedworker,shadowrealm
/**
* These tests assert the non-existence of certain
* legacy Console methods that are not included in
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/wpt/console/idlharness-shadowrealm.window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// META: script=/resources/idlharness-shadowrealm.js

// https://console.spec.whatwg.org/

idl_test_shadowrealm(["console"], []);
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"path": "common"
},
"console": {
"commit": "3b1f72e99a91d31551edd2147dc7b564eaf25d72",
"commit": "767ae354642bee1e4d90b28df4480475b9260e14",
"path": "console"
},
"dom/abort": {
Expand Down

0 comments on commit 6a20cbb

Please sign in to comment.