| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_connection_handler.h" | 5 #include "chromeos/network/network_connection_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 virtual void SetUp() OVERRIDE { | 54 virtual void SetUp() OVERRIDE { |
| 55 ASSERT_TRUE(user_.constructed_successfully()); | 55 ASSERT_TRUE(user_.constructed_successfully()); |
| 56 user_.FinishInit(); | 56 user_.FinishInit(); |
| 57 | 57 |
| 58 test_nssdb_.reset(new net::NSSCertDatabaseChromeOS( | 58 test_nssdb_.reset(new net::NSSCertDatabaseChromeOS( |
| 59 crypto::GetPublicSlotForChromeOSUser(user_.username_hash()), | 59 crypto::GetPublicSlotForChromeOSUser(user_.username_hash()), |
| 60 crypto::GetPrivateSlotForChromeOSUser( | 60 crypto::GetPrivateSlotForChromeOSUser( |
| 61 user_.username_hash(), | 61 user_.username_hash(), |
| 62 base::Callback<void(crypto::ScopedPK11Slot)>()))); | 62 base::Callback<void(crypto::ScopedPK11Slot)>()))); |
| 63 test_nssdb_->SetSlowTaskRunnerForTest(message_loop_.message_loop_proxy()); |
| 63 | 64 |
| 64 TPMTokenLoader::InitializeForTest(); | 65 TPMTokenLoader::InitializeForTest(); |
| 65 | 66 |
| 66 CertLoader::Initialize(); | 67 CertLoader::Initialize(); |
| 67 CertLoader* cert_loader = CertLoader::Get(); | 68 CertLoader* cert_loader = CertLoader::Get(); |
| 68 cert_loader->SetSlowTaskRunnerForTest(message_loop_.message_loop_proxy()); | |
| 69 cert_loader->force_hardware_backed_for_test(); | 69 cert_loader->force_hardware_backed_for_test(); |
| 70 | 70 |
| 71 // Initialize DBusThreadManager with a stub implementation. | 71 // Initialize DBusThreadManager with a stub implementation. |
| 72 DBusThreadManager::InitializeWithStub(); | 72 DBusThreadManager::InitializeWithStub(); |
| 73 base::RunLoop().RunUntilIdle(); | 73 base::RunLoop().RunUntilIdle(); |
| 74 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface() | 74 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface() |
| 75 ->ClearServices(); | 75 ->ClearServices(); |
| 76 base::RunLoop().RunUntilIdle(); | 76 base::RunLoop().RunUntilIdle(); |
| 77 LoginState::Initialize(); | 77 LoginState::Initialize(); |
| 78 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); | 78 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 Connect("no-network"); | 322 Connect("no-network"); |
| 323 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, | 323 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, |
| 324 GetResultAndReset()); | 324 GetResultAndReset()); |
| 325 | 325 |
| 326 EXPECT_TRUE(Configure(kConfigConnectable)); | 326 EXPECT_TRUE(Configure(kConfigConnectable)); |
| 327 Disconnect("wifi0"); | 327 Disconnect("wifi0"); |
| 328 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); | 328 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace chromeos | 331 } // namespace chromeos |
| OLD | NEW |