Skip to content

Commit 3e58f81

Browse files
nodejs-github-botaduh95
authored andcommitted
test: update WPT for WebCryptoAPI to b48efd681e
PR-URL: #58044 Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 2f4e416 commit 3e58f81

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

test/fixtures/wpt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Last update:
3232
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
3333
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
3434
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
35-
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/164426ace2/WebCryptoAPI
35+
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/b48efd681e/WebCryptoAPI
3636
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions
3737
- webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel
3838
- webstorage: https://github.com/web-platform-tests/wpt/tree/1291340aaa/webstorage

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,23 @@ function run_test(algorithmNames) {
267267
});
268268
});
269269
});
270+
271+
// Use an 'alg' field with incorrect casing.
272+
testVectors.forEach(function(vector) {
273+
var name = vector.name;
274+
if (name !== "Ed25519" && name !== "Ed448")
275+
return; // The rest ignore the 'alg' field.
276+
allAlgorithmSpecifiersFor(name).forEach(function(algorithm) {
277+
getValidKeyData(algorithm).forEach(function(test) {
278+
if (test.format === "jwk") {
279+
var data = {crv: test.data.crv, kty: test.data.kty, d: test.data.d, x: test.data.x, y: test.data.y};
280+
var usages = validUsages(vector, 'jwk', test.data);
281+
[name.toLowerCase(), name.toUpperCase()].forEach(function(algName) {
282+
data.alg = algName;
283+
testError('jwk', algorithm, data, name, usages, true, "DataError", "Invalid 'alg' field '" + data.alg + "'");
284+
});
285+
}
286+
});
287+
});
288+
});
270289
}

test/fixtures/wpt/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"path": "wasm/webapi"
8989
},
9090
"WebCryptoAPI": {
91-
"commit": "164426ace287247bd99e6d1cee31035875ad57a0",
91+
"commit": "b48efd681ea3a5b0daa6b866c3bb54bec895037b",
9292
"path": "WebCryptoAPI"
9393
},
9494
"webidl/ecmascript-binding/es-exceptions": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy