-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update WPT for WebCryptoAPI to 3e3374efde
PR-URL: #56093 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jason Zhang <[email protected]>
- Loading branch information
1 parent
9486c7c
commit da354f4
Showing
4 changed files
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
test/fixtures/wpt/WebCryptoAPI/crypto_key_cached_slots.https.any.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// META: title=WebCryptoAPI: CryptoKey cached ECMAScript objects | ||
|
||
// https://w3c.github.io/webcrypto/#dom-cryptokey-algorithm | ||
// https://github.com/servo/servo/issues/33908 | ||
|
||
promise_test(function() { | ||
return self.crypto.subtle.generateKey( | ||
{ | ||
name: "AES-CTR", | ||
length: 256, | ||
}, | ||
true, | ||
["encrypt"], | ||
).then( | ||
function(key) { | ||
let a = key.algorithm; | ||
let b = key.algorithm; | ||
assert_true(a === b); | ||
}, | ||
function(err) { | ||
assert_unreached("generateKey threw an unexpected error: " + err.toString()); | ||
} | ||
); | ||
}, "CryptoKey.algorithm getter returns cached object"); | ||
|
||
promise_test(function() { | ||
return self.crypto.subtle.generateKey( | ||
{ | ||
name: "AES-CTR", | ||
length: 256, | ||
}, | ||
true, | ||
["encrypt"], | ||
).then( | ||
function(key) { | ||
let a = key.usages; | ||
let b = key.usages; | ||
assert_true(a === b); | ||
}, | ||
function(err) { | ||
assert_unreached("generateKey threw an unexpected error: " + err.toString()); | ||
} | ||
); | ||
}, "CryptoKey.usages getter returns cached object"); |
24 changes: 0 additions & 24 deletions
24
test/fixtures/wpt/WebCryptoAPI/cryptokey_algorithm_returns_cached_object.https.any.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters