Skip to content

Commit 4d9eeba

Browse files
test: update WPT for WebCryptoAPI to 3e3374efde
1 parent 7c8827d commit 4d9eeba

4 files changed

+46
-26
lines changed

test/fixtures/wpt/README.md

+1-1
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");

test/fixtures/wpt/WebCryptoAPI/cryptokey_algorithm_returns_cached_object.https.any.js

-24
This file was deleted.

test/fixtures/wpt/versions.json

+1-1
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": {

0 commit comments

Comments
 (0)