Skip to content

Commit 1baafcc

Browse files
nodejs-github-botpanva
authored andcommitted
test: update WPT resources, interfaces and WebCryptoAPI
PR-URL: #62389 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d4fa60c commit 1baafcc

83 files changed

Lines changed: 2316 additions & 2442 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎test/fixtures/wpt/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ Last update:
2323
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
2424
- html/webappapis/structured-clone: https://github.com/web-platform-tests/wpt/tree/47d3fb280c/html/webappapis/structured-clone
2525
- html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers
26-
- interfaces: https://github.com/web-platform-tests/wpt/tree/e1b27be06b/interfaces
26+
- interfaces: https://github.com/web-platform-tests/wpt/tree/a8392bd021/interfaces
2727
- performance-timeline: https://github.com/web-platform-tests/wpt/tree/94caab7038/performance-timeline
2828
- resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing
29-
- resources: https://github.com/web-platform-tests/wpt/tree/1d2c5fb36a/resources
29+
- resources: https://github.com/web-platform-tests/wpt/tree/6a2f322376/resources
3030
- streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams
3131
- url: https://github.com/web-platform-tests/wpt/tree/c928b19ab0/url
3232
- urlpattern: https://github.com/web-platform-tests/wpt/tree/a2e15ad405/urlpattern
3333
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
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/0acea989ac/WebCryptoAPI
37+
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/caebe89c3b/WebCryptoAPI
3838
- webidl: https://github.com/web-platform-tests/wpt/tree/63ca529a02/webidl
3939
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions
4040
- webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/argon2.js‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ function define_tests() {
5151
varalgorithmName=vector.algorithm;
5252
varpassword=vector.password;
5353

54-
// Key for normal operations
5554
promises.push(
5655
subtle
5756
.importKey('raw-secret',password,algorithmName,false,[
@@ -70,20 +69,3 @@ function define_tests() {
7069
});
7170
}
7271
}
73-
74-
functionequalBuffers(a,b){
75-
if(a.byteLength!==b.byteLength){
76-
returnfalse;
77-
}
78-
79-
varaView=newUint8Array(a);
80-
varbView=newUint8Array(b);
81-
82-
for(vari=0;i<aView.length;i++){
83-
if(aView[i]!==bView[i]){
84-
returnfalse;
85-
}
86-
}
87-
88-
returntrue;
89-
}

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/argon2.tentative.https.any.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// META: title=WebCryptoAPI: deriveBits() Using Argon2
22
// META: timeout=long
3+
// META: script=../util/helpers.js
34
// META: script=/common/subset-tests.js
45
// META: script=argon2_vectors.js
56
// META: script=argon2.js

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/argon2_vectors.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ function getTestData() {
22
// Test vectors from RFC 9106
33
// https://www.rfc-editor.org/rfc/rfc9106
44

5-
// Test vectors from RFC 9106
65
vartestVectors=[
76
// Argon2d test vector
87
{

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits.js‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -224,37 +224,4 @@ function define_tests(algorithmName) {
224224
.then(function(results){return{privateKeys: privateKeys,publicKeys: publicKeys,noDeriveBitsKeys: noDeriveBitsKeys,ecdhKeys: ecdhPublicKeys}});
225225
}
226226

227-
// Compares two ArrayBuffer or ArrayBufferView objects. If bitCount is
228-
// omitted, the two values must be the same length and have the same contents
229-
// in every byte. If bitCount is included, only that leading number of bits
230-
// have to match.
231-
functionequalBuffers(a,b,bitCount){
232-
varremainder;
233-
234-
if(typeofbitCount==="undefined"&&a.byteLength!==b.byteLength){
235-
returnfalse;
236-
}
237-
238-
varaBytes=newUint8Array(a);
239-
varbBytes=newUint8Array(b);
240-
241-
varlength=a.byteLength;
242-
if(typeofbitCount!=="undefined"){
243-
length=Math.floor(bitCount/8);
244-
}
245-
246-
for(vari=0;i<length;i++){
247-
if(aBytes[i]!==bBytes[i]){
248-
returnfalse;
249-
}
250-
}
251-
252-
if(typeofbitCount!=="undefined"){
253-
remainder=bitCount%8;
254-
returnaBytes[length]>>(8-remainder)===bBytes[length]>>(8-remainder);
255-
}
256-
257-
returntrue;
258-
}
259-
260227
}

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits_curve25519.https.any.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// META: title=WebCryptoAPI: deriveKey() Using ECDH with CFRG Elliptic Curves
2+
// META: script=../util/helpers.js
23
// META: script=cfrg_curves_bits_fixtures.js
34
// META: script=cfrg_curves_bits.js
45

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits_curve448.tentative.https.any.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// META: title=WebCryptoAPI: deriveKey() Using ECDH with CFRG Elliptic Curves
2+
// META: script=../util/helpers.js
23
// META: script=cfrg_curves_bits_fixtures.js
34
// META: script=cfrg_curves_bits.js
45

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_keys.js‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -221,37 +221,4 @@ function define_tests(algorithmName) {
221221
.then(function(results){return{privateKeys: privateKeys,publicKeys: publicKeys,noDeriveKeyKeys: noDeriveKeyKeys,ecdhKeys: ecdhPublicKeys}});
222222
}
223223

224-
// Compares two ArrayBuffer or ArrayBufferView objects. If bitCount is
225-
// omitted, the two values must be the same length and have the same contents
226-
// in every byte. If bitCount is included, only that leading number of bits
227-
// have to match.
228-
functionequalBuffers(a,b,bitCount){
229-
varremainder;
230-
231-
if(typeofbitCount==="undefined"&&a.byteLength!==b.byteLength){
232-
returnfalse;
233-
}
234-
235-
varaBytes=newUint8Array(a);
236-
varbBytes=newUint8Array(b);
237-
238-
varlength=a.byteLength;
239-
if(typeofbitCount!=="undefined"){
240-
length=Math.floor(bitCount/8);
241-
}
242-
243-
for(vari=0;i<length;i++){
244-
if(aBytes[i]!==bBytes[i]){
245-
returnfalse;
246-
}
247-
}
248-
249-
if(typeofbitCount!=="undefined"){
250-
remainder=bitCount%8;
251-
returnaBytes[length]>>(8-remainder)===bBytes[length]>>(8-remainder);
252-
}
253-
254-
returntrue;
255-
}
256-
257224
}

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_keys_curve25519.https.any.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// META: title=WebCryptoAPI: deriveKey() Using ECDH with CFRG Elliptic Curves
2+
// META: script=../util/helpers.js
23
// META: script=cfrg_curves_bits_fixtures.js
34
// META: script=cfrg_curves_keys.js
45

‎test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/cfrg_curves_keys_curve448.tentative.https.any.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// META: title=WebCryptoAPI: deriveKey() Using ECDH with CFRG Elliptic Curves
2+
// META: script=../util/helpers.js
23
// META: script=cfrg_curves_bits_fixtures.js
34
// META: script=cfrg_curves_keys.js
45

0 commit comments

Comments
 (0)