OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/stl_util.h" | 5 #include "base/stl_util.h" |
6 #include "content/child/webcrypto/algorithm_dispatch.h" | 6 #include "content/child/webcrypto/algorithm_dispatch.h" |
7 #include "content/child/webcrypto/crypto_data.h" | 7 #include "content/child/webcrypto/crypto_data.h" |
8 #include "content/child/webcrypto/status.h" | 8 #include "content/child/webcrypto/status.h" |
9 #include "content/child/webcrypto/test/test_helpers.h" | 9 #include "content/child/webcrypto/test/test_helpers.h" |
10 #include "content/child/webcrypto/webcrypto_util.h" | 10 #include "content/child/webcrypto/webcrypto_util.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 TEST(WebCryptoAesGcmTest, GenerateKeyEmptyUsage) { | 118 TEST(WebCryptoAesGcmTest, GenerateKeyEmptyUsage) { |
119 if (!SupportsAesGcm()) { | 119 if (!SupportsAesGcm()) { |
120 LOG(WARNING) << "AES GCM not supported, skipping tests"; | 120 LOG(WARNING) << "AES GCM not supported, skipping tests"; |
121 return; | 121 return; |
122 } | 122 } |
123 | 123 |
124 blink::WebCryptoKey key; | 124 blink::WebCryptoKey key; |
125 EXPECT_EQ(Status::ErrorCreateKeyEmptyUsages(), | 125 EXPECT_EQ(Status::ErrorKeyEmptyUsages(), |
126 GenerateSecretKey(CreateAesGcmKeyGenAlgorithm(256), true, 0, &key)); | 126 GenerateSecretKey(CreateAesGcmKeyGenAlgorithm(256), true, 0, &key)); |
127 } | 127 } |
128 | 128 |
129 TEST(WebCryptoAesGcmTest, ImportExportJwk) { | 129 TEST(WebCryptoAesGcmTest, ImportExportJwk) { |
130 // Some Linux test runners may not have a new enough version of NSS. | 130 // Some Linux test runners may not have a new enough version of NSS. |
131 if (!SupportsAesGcm()) { | 131 if (!SupportsAesGcm()) { |
132 LOG(WARNING) << "AES GCM not supported, skipping tests"; | 132 LOG(WARNING) << "AES GCM not supported, skipping tests"; |
133 return; | 133 return; |
134 } | 134 } |
135 | 135 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 test_authentication_tag, &plain_text)); | 239 test_authentication_tag, &plain_text)); |
240 } | 240 } |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 } // namespace | 244 } // namespace |
245 | 245 |
246 } // namespace webcrypto | 246 } // namespace webcrypto |
247 | 247 |
248 } // namespace content | 248 } // namespace content |
OLD | NEW |