Index: content/child/webcrypto/shared_crypto_unittest.cc |
diff --git a/content/child/webcrypto/shared_crypto_unittest.cc b/content/child/webcrypto/shared_crypto_unittest.cc |
index f7acd6da5189407e8351292372715a2d2877523a..696868e28394dc4f1a2c9a9d707b4ef14f535d8f 100644 |
--- a/content/child/webcrypto/shared_crypto_unittest.cc |
+++ b/content/child/webcrypto/shared_crypto_unittest.cc |
@@ -516,6 +516,19 @@ Status AesGcmDecrypt(const blink::WebCryptoKey& key, |
return Decrypt(algorithm, key, CryptoData(cipher_text_with_tag), plain_text); |
} |
+Status ImportKeyJwk(const CryptoData& key_data, |
+ const blink::WebCryptoAlgorithm& algorithm, |
+ bool extractable, |
+ blink::WebCryptoKeyUsageMask usage_mask, |
+ blink::WebCryptoKey* key) { |
+ return ImportKey(blink::WebCryptoKeyFormatJwk, |
+ key_data, |
+ algorithm, |
+ extractable, |
+ usage_mask, |
+ key); |
+} |
+ |
Status ImportKeyJwkFromDict(const base::DictionaryValue& dict, |
const blink::WebCryptoAlgorithm& algorithm, |
bool extractable, |
@@ -1720,7 +1733,7 @@ TEST_F(SharedCryptoTest, MAYBE(ImportExportJwkSymmetricKey)) { |
HexStringToBytes(test.key_hex), test.algorithm, test.usage); |
// Export the key in JWK format and validate. |
- ASSERT_STATUS_SUCCESS(ExportKeyJwk(key, &json)); |
+ ASSERT_STATUS_SUCCESS(ExportKey(blink::WebCryptoKeyFormatJwk, key, &json)); |
EXPECT_TRUE(VerifySecretJwk(json, test.jwk_alg, test.key_hex, test.usage)); |
// Import the JWK-formatted key. |