| 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 "chromeos/network/auto_connect_handler.h" | 5 #include "chromeos/network/auto_connect_handler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 ASSERT_TRUE(test_nssdb_.is_open()); | 64 ASSERT_TRUE(test_nssdb_.is_open()); |
| 65 | 65 |
| 66 // Use the same DB for public and private slot. | 66 // Use the same DB for public and private slot. |
| 67 test_nsscertdb_.reset(new net::NSSCertDatabaseChromeOS( | 67 test_nsscertdb_.reset(new net::NSSCertDatabaseChromeOS( |
| 68 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())), | 68 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())), |
| 69 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())))); | 69 crypto::ScopedPK11Slot(PK11_ReferenceSlot(test_nssdb_.slot())))); |
| 70 test_nsscertdb_->SetSlowTaskRunnerForTest(message_loop_.task_runner()); | 70 test_nsscertdb_->SetSlowTaskRunnerForTest(message_loop_.task_runner()); |
| 71 | 71 |
| 72 CertLoader::Initialize(); | 72 CertLoader::Initialize(); |
| 73 CertLoader::ForceHardwareBackedForTesting(); | 73 CertLoader::ForceHardwareBackedForTesting(); |
| 74 CertLoader::Get()->SetSlowTaskRunnerForTest(message_loop_.task_runner()); |
| 74 | 75 |
| 75 DBusThreadManager::Initialize(); | 76 DBusThreadManager::Initialize(); |
| 76 | 77 |
| 77 NetworkStateTest::SetUp(); | 78 NetworkStateTest::SetUp(); |
| 78 | 79 |
| 79 LoginState::Initialize(); | 80 LoginState::Initialize(); |
| 80 | 81 |
| 81 network_config_handler_.reset( | 82 network_config_handler_.reset( |
| 82 NetworkConfigurationHandler::InitializeForTest( | 83 NetworkConfigurationHandler::InitializeForTest( |
| 83 network_state_handler(), nullptr /* network_device_handler */)); | 84 network_state_handler(), nullptr /* network_device_handler */)); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 // Applying the user policy after login would usually trigger connecting to | 453 // Applying the user policy after login would usually trigger connecting to |
| 453 // the 'best' network. But the manual connect prevents this. | 454 // the 'best' network. But the manual connect prevents this. |
| 454 SetupPolicy(std::string(), // no network configs | 455 SetupPolicy(std::string(), // no network configs |
| 455 base::DictionaryValue(), // no global config | 456 base::DictionaryValue(), // no global config |
| 456 true); // load as user policy | 457 true); // load as user policy |
| 457 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0")); | 458 EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0")); |
| 458 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1")); | 459 EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1")); |
| 459 } | 460 } |
| 460 | 461 |
| 461 } // namespace chromeos | 462 } // namespace chromeos |
| OLD | NEW |