Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a4aa9eb

Browse filesBrowse files
aduh95bengl
authored andcommitted
test: use global webcrypto for WPT tests
PR-URL: #42236 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 9af9083 commit a4aa9eb
Copy full SHA for a4aa9eb

File tree

Expand file treeCollapse file tree

1 file changed

+1
-40
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-40
lines changed
Open diff view settings
Collapse file

‎test/wpt/test-webcrypto.js‎

Copy file name to clipboardExpand all lines: test/wpt/test-webcrypto.js
+1-40Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,6 @@ const { WPTRunner } = require('../common/wpt');
99
const runner = new WPTRunner('WebCryptoAPI');
1010

1111
// Set Node.js flags required for the tests.
12-
runner.setFlags(['--expose-internals']);
13-
14-
// Set a script that will be executed in the worker before running the tests.
15-
runner.setInitScript(`
16-
const {
17-
Crypto,
18-
SubtleCrypto,
19-
crypto,
20-
} = require('internal/crypto/webcrypto');
21-
const { internalBinding } = require('internal/test/binding');
22-
const { DOMException } = internalBinding('messaging');
23-
global.DOMException = DOMException;
24-
25-
Object.defineProperties(global, {
26-
Crypto: {
27-
value: Crypto,
28-
configurable: true,
29-
writable: true,
30-
enumerable: false,
31-
},
32-
SubtleCrypto: {
33-
value: SubtleCrypto,
34-
configurable: true,
35-
writable: true,
36-
enumerable: false,
37-
},
38-
CryptoKey: {
39-
value: crypto.CryptoKey,
40-
configurable: true,
41-
writable: true,
42-
enumerable: false,
43-
},
44-
crypto: {
45-
value: crypto,
46-
configurable: true,
47-
writable: true,
48-
enumerable: false,
49-
},
50-
});
51-
`);
12+
runner.setFlags(['--experimental-global-webcrypto']);
5213

5314
runner.runJsTests();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.