◐ Shell
clean mode source ↗

test: update WPT for WebCryptoAPI to 3e3374efde · nodejs/node@d0302e7

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/76dfa54e5d/WebCryptoAPI

35+

- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/3e3374efde/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/9dafa89214/webstorage

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,44 @@

1+

// META: title=WebCryptoAPI: CryptoKey cached ECMAScript objects

2+
3+

// https://w3c.github.io/webcrypto/#dom-cryptokey-algorithm

4+

// https://github.com/servo/servo/issues/33908

5+
6+

promise_test(function() {

7+

return self.crypto.subtle.generateKey(

8+

{

9+

name: "AES-CTR",

10+

length: 256,

11+

},

12+

true,

13+

["encrypt"],

14+

).then(

15+

function(key) {

16+

let a = key.algorithm;

17+

let b = key.algorithm;

18+

assert_true(a === b);

19+

},

20+

function(err) {

21+

assert_unreached("generateKey threw an unexpected error: " + err.toString());

22+

}

23+

);

24+

}, "CryptoKey.algorithm getter returns cached object");

25+
26+

promise_test(function() {

27+

return self.crypto.subtle.generateKey(

28+

{

29+

name: "AES-CTR",

30+

length: 256,

31+

},

32+

true,

33+

["encrypt"],

34+

).then(

35+

function(key) {

36+

let a = key.usages;

37+

let b = key.usages;

38+

assert_true(a === b);

39+

},

40+

function(err) {

41+

assert_unreached("generateKey threw an unexpected error: " + err.toString());

42+

}

43+

);

44+

}, "CryptoKey.usages getter returns cached object");

Original file line numberDiff line numberDiff line change

@@ -88,7 +88,7 @@

8888

"path": "wasm/webapi"

8989

},

9090

"WebCryptoAPI": {

91-

"commit": "76dfa54e5df7f8cee7501cc6d598cf647c2b8564",

91+

"commit": "3e3374efde7ce73d551ea908d52d0afab046971a",

9292

"path": "WebCryptoAPI"

9393

},

9494

"webidl/ecmascript-binding/es-exceptions": {