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 55c3bb7a57a75a35305d7f46148e27ed28001044..abcb27162ba1aad9206e157dbc82461ca5879528 100644 |
--- a/content/child/webcrypto/shared_crypto_unittest.cc |
+++ b/content/child/webcrypto/shared_crypto_unittest.cc |
@@ -808,7 +808,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)); |
} |
@@ -1712,7 +1712,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( |
@@ -1735,6 +1735,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, |