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 6995b48c4b07868b63f7df252dc5f99df9611e5d..821945fb800bb70c7cb84b27d7ae94dc29c70568 100644 |
--- a/content/child/webcrypto/shared_crypto_unittest.cc |
+++ b/content/child/webcrypto/shared_crypto_unittest.cc |
@@ -810,7 +810,7 @@ TEST_F(SharedCryptoTest, AesCbcFailures) { |
// keys). |
EXPECT_STATUS(Status::ErrorUnexpectedKeyType(), |
ExportKey(blink::WebCryptoKeyFormatSpki, key, &output)); |
- EXPECT_STATUS(Status::ErrorUnsupported(), |
+ EXPECT_STATUS(Status::ErrorUnexpectedKeyType(), |
ExportKey(blink::WebCryptoKeyFormatPkcs8, key, &output)); |
} |
@@ -1681,7 +1681,7 @@ TEST_F(SharedCryptoTest, MAYBE(ImportExportSpki)) { |
ExportKey(blink::WebCryptoKeyFormatSpki, key, &output)); |
} |
-TEST_F(SharedCryptoTest, MAYBE(ImportPkcs8)) { |
+TEST_F(SharedCryptoTest, MAYBE(ImportExportPkcs8)) { |
// Passing case: Import a valid RSA key in PKCS#8 format. |
blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); |
ASSERT_STATUS_SUCCESS(ImportKey( |
@@ -1704,6 +1704,11 @@ TEST_F(SharedCryptoTest, MAYBE(ImportPkcs8)) { |
"010001", |
CryptoData(key.algorithm().rsaHashedParams()->publicExponent())); |
+ blink::WebArrayBuffer exported_key; |
+ ASSERT_STATUS_SUCCESS( |
+ ExportKey(blink::WebCryptoKeyFormatPkcs8, key, &exported_key)); |
+ ExpectArrayBufferMatchesHex(kPrivateKeyPkcs8DerHex, exported_key); |
+ |
// Failing case: Empty PKCS#8 data |
EXPECT_STATUS(Status::ErrorImportEmptyKeyData(), |
ImportKey(blink::WebCryptoKeyFormatPkcs8, |