Chromium Code Reviews| Index: content/child/webcrypto/test/rsa_ssa_unittest.cc |
| diff --git a/content/child/webcrypto/test/rsa_ssa_unittest.cc b/content/child/webcrypto/test/rsa_ssa_unittest.cc |
| index 1733ae78e3a9ce92aef0d0e05bb9d6edd9f4399b..7d18d6ea27bffcdc8d0840c15261f80a7f99fc6d 100644 |
| --- a/content/child/webcrypto/test/rsa_ssa_unittest.cc |
| +++ b/content/child/webcrypto/test/rsa_ssa_unittest.cc |
| @@ -823,6 +823,18 @@ TEST(WebCryptoRsaSsaTest, GenerateKeyPairEmptyUsages) { |
| true, 0, &public_key, &private_key)); |
| } |
| +TEST(WebCryptoRsaSsaTest, ImportKeyEmptyUsages) { |
| + blink::WebCryptoKey key; |
| + ASSERT_EQ(Status::ErrorImportKeyEmptyUsages(), |
|
eroman
2014/12/09 17:42:55
Incorrect, this should pass per the spec.
|
| + ImportKey(blink::WebCryptoKeyFormatSpki, |
| + CryptoData(HexStringToBytes(kPublicKeySpkiDerHex)), |
| + CreateRsaHashedImportAlgorithm( |
| + blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, |
| + blink::WebCryptoAlgorithmIdSha256), |
| + true, 0, &key)); |
| + |
| +} |
| + |
| TEST(WebCryptoRsaSsaTest, ImportExportJwkRsaPublicKey) { |
| struct TestCase { |
| const blink::WebCryptoAlgorithmId hash; |