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

Unified Diff: LayoutTests/crypto/aes-export-key.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/aes-cbc-wrap-rsa-non-extractable.html ('k') | LayoutTests/crypto/hmac-export-key.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/crypto/aes-export-key.html
diff --git a/LayoutTests/crypto/aes-export-key.html b/LayoutTests/crypto/aes-export-key.html
index e4da05cb6e79ab10c5d4159ee8c4b4296eeb25d1..b6f71699be772ca70de870edf8eeaa6c63daa1a0 100644
--- a/LayoutTests/crypto/aes-export-key.html
+++ b/LayoutTests/crypto/aes-export-key.html
@@ -21,8 +21,6 @@ var jwkKey = {
k: "jnOw99oOZFLIEPMrgJB55WL46tJSLGt7jnOw99oOZFI"
};
-var jwkKeyAsArrayBuffer = asciiToUint8Array(JSON.stringify(jwkKey));
-
Promise.resolve(null).then(function(result) {
return crypto.subtle.exportKey("raw");
}).then(failAndFinishJSTest, function(result) {
@@ -41,7 +39,7 @@ Promise.resolve(null).then(function(result) {
logError(result);
debug("\nImporting a JWK key...");
- return crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, {name: "AES-CBC"}, extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']);
+ return crypto.subtle.importKey("jwk", jwkKey, {name: "AES-CBC"}, extractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']);
}).then(function(result) {
key = result;
@@ -79,7 +77,7 @@ Promise.resolve(null).then(function(result) {
shouldBe("exportedJWK.key_ops", "['encrypt', 'decrypt', 'wrapKey', 'unwrapKey']");
debug("\nImporting a key that's not extractable...");
- return crypto.subtle.importKey("jwk", jwkKeyAsArrayBuffer, {name: "AES-CBC"}, nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey'])
+ return crypto.subtle.importKey("jwk", jwkKey, {name: "AES-CBC"}, nonExtractable, ['encrypt', 'decrypt', 'wrapKey', 'unwrapKey'])
}).then(function(result) {
key = result;
« no previous file with comments | « LayoutTests/crypto/aes-cbc-wrap-rsa-non-extractable.html ('k') | LayoutTests/crypto/hmac-export-key.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698