Skip to content

Commit 15d8cc9

Browse files
nodejs-github-bottargos
authored andcommitted
test: update WPT for WebCryptoAPI to 19d82c57ab
PR-URL: #59129 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3f813ea commit 15d8cc9

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

test/fixtures/wpt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Last update:
3434
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
3535
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
3636
- web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks
37-
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/591c95ce61/WebCryptoAPI
37+
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/19d82c57ab/WebCryptoAPI
3838
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions
3939
- webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel
4040
- webstorage: https://github.com/web-platform-tests/wpt/tree/1291340aaa/webstorage

test/fixtures/wpt/WebCryptoAPI/import_export/okp_importKey_failures_fixtures.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
// helper functions that generate all possible test parameters for
33
// different situations.
44
function getValidKeyData(algorithm) {
5-
return validKeyData[algorithm.name];
5+
return validKeyData[algorithm.name || algorithm];
66
}
77

88
function getBadKeyLengthData(algorithm) {
9-
return badKeyLengthData[algorithm.name];
9+
return badKeyLengthData[algorithm.name || algorithm];
1010
}
1111

1212
function getMissingJWKFieldKeyData(algorithm) {
13-
return missingJWKFieldKeyData[algorithm.name];
13+
return missingJWKFieldKeyData[algorithm.name || algorithm];
1414
}
1515

1616
function getMismatchedJWKKeyData(algorithm) {
17-
return mismatchedJWKKeyData[algorithm.name];
17+
return mismatchedJWKKeyData[algorithm.name || algorithm];
1818
}
1919

2020
function getMismatchedKtyField(algorithm) {
21-
return mismatchedKtyField[algorithm.name];
21+
return mismatchedKtyField[algorithm.name || algorithm];
2222
}
2323

2424
function getMismatchedCrvField(algorithm) {
25-
return mismatchedCrvField[algorithm.name];
25+
return mismatchedCrvField[algorithm.name || algorithm];
2626
}
2727

2828
var validKeyData = {

test/fixtures/wpt/WebCryptoAPI/util/helpers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ function objectToString(obj) {
9393
// Is key a CryptoKey object with correct algorithm, extractable, and usages?
9494
// Is it a secret, private, or public kind of key?
9595
function assert_goodCryptoKey(key, algorithm, extractable, usages, kind) {
96+
if (typeof algorithm === "string") {
97+
algorithm = { name: algorithm };
98+
}
99+
96100
var correctUsages = [];
97101

98102
var registeredAlgorithmName;
@@ -203,6 +207,7 @@ function allAlgorithmSpecifiersFor(algorithmName) {
203207
results.push({name: algorithmName, namedCurve: curveName});
204208
});
205209
} else if (algorithmName.toUpperCase().substring(0, 1) === "X" || algorithmName.toUpperCase().substring(0, 2) === "ED") {
210+
results.push(algorithmName);
206211
results.push({ name: algorithmName });
207212
}
208213

test/fixtures/wpt/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"path": "web-locks"
9797
},
9898
"WebCryptoAPI": {
99-
"commit": "591c95ce6174690b92833cd92859ce2807714591",
99+
"commit": "19d82c57abc7494bdc459a338c5dcfd79e818b4a",
100100
"path": "WebCryptoAPI"
101101
},
102102
"webidl/ecmascript-binding/es-exceptions": {

0 commit comments

Comments
 (0)