OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chromeos/network/network_cert_migrator.h" | 5 #include "chromeos/network/network_cert_migrator.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 300 } |
301 | 301 |
302 scoped_ptr<NetworkStateHandler> network_state_handler_; | 302 scoped_ptr<NetworkStateHandler> network_state_handler_; |
303 scoped_ptr<NetworkCertMigrator> network_cert_migrator_; | 303 scoped_ptr<NetworkCertMigrator> network_cert_migrator_; |
304 crypto::ScopedTestNSSChromeOSUser user_; | 304 crypto::ScopedTestNSSChromeOSUser user_; |
305 scoped_ptr<net::NSSCertDatabaseChromeOS> test_nssdb_; | 305 scoped_ptr<net::NSSCertDatabaseChromeOS> test_nssdb_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(NetworkCertMigratorTest); | 307 DISALLOW_COPY_AND_ASSIGN(NetworkCertMigratorTest); |
308 }; | 308 }; |
309 | 309 |
| 310 // http://crbug.com/418369 |
| 311 #ifndef NDEBUG |
310 TEST_F(NetworkCertMigratorTest, MigrateNssOnInitialization) { | 312 TEST_F(NetworkCertMigratorTest, MigrateNssOnInitialization) { |
311 // Add a new network for migration before the handlers are initialized. | 313 // Add a new network for migration before the handlers are initialized. |
312 SetupWifiWithNss(); | 314 SetupWifiWithNss(); |
313 SetupTestCACert(); | 315 SetupTestCACert(); |
314 SetupNetworkHandlers(); | 316 SetupNetworkHandlers(); |
315 | 317 |
316 base::RunLoop().RunUntilIdle(); | 318 base::RunLoop().RunUntilIdle(); |
317 std::string nss_nickname, ca_pem; | 319 std::string nss_nickname, ca_pem; |
318 GetEapCACertProperties(&nss_nickname, &ca_pem); | 320 GetEapCACertProperties(&nss_nickname, &ca_pem); |
319 EXPECT_TRUE(nss_nickname.empty()); | 321 EXPECT_TRUE(nss_nickname.empty()); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 499 |
498 base::RunLoop().RunUntilIdle(); | 500 base::RunLoop().RunUntilIdle(); |
499 | 501 |
500 std::string pkcs11_id; | 502 std::string pkcs11_id; |
501 std::string slot_id; | 503 std::string slot_id; |
502 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); | 504 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); |
503 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); | 505 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); |
504 EXPECT_EQ(test_client_cert_slot_id_, slot_id); | 506 EXPECT_EQ(test_client_cert_slot_id_, slot_id); |
505 } | 507 } |
506 | 508 |
| 509 #endif |
| 510 |
507 } // namespace chromeos | 511 } // namespace chromeos |
OLD | NEW |