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

Unified Diff: LayoutTests/crypto/hmac-import-jwk.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/hmac-export-key.html ('k') | LayoutTests/crypto/import-jwk.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/hmac-import-jwk.html
diff --git a/LayoutTests/crypto/hmac-import-jwk.html b/LayoutTests/crypto/hmac-import-jwk.html
index 93f7273521fcfccf07c6b6a8691c0539a77c4226..bc990b3c93841eccdb75d272edc191a28064cec1 100644
--- a/LayoutTests/crypto/hmac-import-jwk.html
+++ b/LayoutTests/crypto/hmac-import-jwk.html
@@ -24,10 +24,8 @@ var hmacKey = {
"k": "ahjkn-_387fgnsibf23qsvahjkn-_387fgnsibf23qs"
};
-var hmacKeyAsArrayBuffer = asciiToUint8Array(JSON.stringify(hmacKey));
-
debug("Importing a key...\n");
-crypto.subtle.importKey("jwk", hmacKeyAsArrayBuffer, {name: "HMAC", hash: {name: "SHA-256"}}, nonExtractable, ["sign", "verify"]).then(function(result) {
+crypto.subtle.importKey("jwk", hmacKey, {name: "HMAC", hash: {name: "SHA-256"}}, nonExtractable, ["sign", "verify"]).then(function(result) {
key = result;
shouldBe("key.type", "'secret'");
« no previous file with comments | « LayoutTests/crypto/hmac-export-key.html ('k') | LayoutTests/crypto/import-jwk.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698