Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: LayoutTests/crypto/jwk-import-use-values.html

Issue 336173002: [webcrypto] Require importKey() for JWK to provide data as a Javascript object rather than a JSON a… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update additional tests Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/crypto/importKey-badParameters-expected.txt ('k') | LayoutTests/crypto/rsa-export-key.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/jwk-import-use-values.html
diff --git a/LayoutTests/crypto/jwk-import-use-values.html b/LayoutTests/crypto/jwk-import-use-values.html
index 8b05e818d1e9bdf15968cd625d3e689caa72bdc5..b5dc0a0e34c63d4158284e00ca3773991ee12979 100644
--- a/LayoutTests/crypto/jwk-import-use-values.html
+++ b/LayoutTests/crypto/jwk-import-use-values.html
@@ -39,7 +39,7 @@ function testWithAESCBC(expectedUsages, jwkUsages, importUsages)
aesKeyAsJSON.use = jwkUsages.use;
}
- return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(aesKeyAsJSON)), {name: "AES-CBC"}, extractable, importUsages).then(function(result) {
+ return crypto.subtle.importKey("jwk", aesKeyAsJSON, {name: "AES-CBC"}, extractable, importUsages).then(function(result) {
key = result;
debug(JSON.stringify(jwkUsages) + ":");
shouldBe("key.usages", JSON.stringify(expectedUsages));
@@ -60,7 +60,7 @@ function testWithHMAC(expectedUsages, jwkUsages, importUsages)
hmacKeyAsJSON.use = jwkUsages.use;
}
- return crypto.subtle.importKey("jwk", asciiToUint8Array(JSON.stringify(hmacKeyAsJSON)), {name: 'hmac', hash: {name: 'sha-256'}}, extractable, importUsages).then(function(result) {
+ return crypto.subtle.importKey("jwk", hmacKeyAsJSON, {name: 'hmac', hash: {name: 'sha-256'}}, extractable, importUsages).then(function(result) {
key = result;
debug(JSON.stringify(jwkUsages) + ":");
shouldBe("key.usages", JSON.stringify(expectedUsages));
« no previous file with comments | « LayoutTests/crypto/importKey-badParameters-expected.txt ('k') | LayoutTests/crypto/rsa-export-key.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698