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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Initialize NSS db for the user. | 51 // Initialize NSS db for the user. |
52 ASSERT_TRUE(user_.constructed_successfully()); | 52 ASSERT_TRUE(user_.constructed_successfully()); |
53 user_.FinishInit(); | 53 user_.FinishInit(); |
54 test_nssdb_.reset(new net::NSSCertDatabaseChromeOS( | 54 test_nssdb_.reset(new net::NSSCertDatabaseChromeOS( |
55 crypto::GetPublicSlotForChromeOSUser(user_.username_hash()), | 55 crypto::GetPublicSlotForChromeOSUser(user_.username_hash()), |
56 crypto::GetPrivateSlotForChromeOSUser( | 56 crypto::GetPrivateSlotForChromeOSUser( |
57 user_.username_hash(), | 57 user_.username_hash(), |
58 base::Callback<void(crypto::ScopedPK11Slot)>()))); | 58 base::Callback<void(crypto::ScopedPK11Slot)>()))); |
59 test_nssdb_->SetSlowTaskRunnerForTest(message_loop_.message_loop_proxy()); | 59 test_nssdb_->SetSlowTaskRunnerForTest(message_loop_.message_loop_proxy()); |
60 | 60 |
61 DBusThreadManager::InitializeWithStub(); | 61 DBusThreadManager::Initialize(); |
62 service_test_ = | 62 service_test_ = |
63 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface(); | 63 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface(); |
64 DBusThreadManager::Get() | 64 DBusThreadManager::Get() |
65 ->GetShillProfileClient() | 65 ->GetShillProfileClient() |
66 ->GetTestInterface() | 66 ->GetTestInterface() |
67 ->AddProfile(kProfile, "" /* userhash */); | 67 ->AddProfile(kProfile, "" /* userhash */); |
68 base::RunLoop().RunUntilIdle(); | 68 base::RunLoop().RunUntilIdle(); |
69 service_test_->ClearServices(); | 69 service_test_->ClearServices(); |
70 base::RunLoop().RunUntilIdle(); | 70 base::RunLoop().RunUntilIdle(); |
71 | 71 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 base::RunLoop().RunUntilIdle(); | 496 base::RunLoop().RunUntilIdle(); |
497 | 497 |
498 std::string pkcs11_id; | 498 std::string pkcs11_id; |
499 std::string slot_id; | 499 std::string slot_id; |
500 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); | 500 GetVpnCertId(false /* IPsec */, &slot_id, &pkcs11_id); |
501 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); | 501 EXPECT_EQ(test_client_cert_pkcs11_id_, pkcs11_id); |
502 EXPECT_EQ(test_client_cert_slot_id_, slot_id); | 502 EXPECT_EQ(test_client_cert_slot_id_, slot_id); |
503 } | 503 } |
504 | 504 |
505 } // namespace chromeos | 505 } // namespace chromeos |
OLD | NEW |