| 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 <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 NetworkConfigurationHandler::InitializeForTest( | 138 NetworkConfigurationHandler::InitializeForTest( |
| 139 network_state_handler_.get(), | 139 network_state_handler_.get(), |
| 140 nullptr /* network_device_handler */)); | 140 nullptr /* network_device_handler */)); |
| 141 | 141 |
| 142 network_profile_handler_.reset(new NetworkProfileHandler()); | 142 network_profile_handler_.reset(new NetworkProfileHandler()); |
| 143 network_profile_handler_->Init(); | 143 network_profile_handler_->Init(); |
| 144 | 144 |
| 145 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); | 145 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); |
| 146 managed_config_handler_->Init( | 146 managed_config_handler_->Init( |
| 147 network_state_handler_.get(), network_profile_handler_.get(), | 147 network_state_handler_.get(), network_profile_handler_.get(), |
| 148 network_config_handler_.get(), nullptr /* network_device_handler */); | 148 network_config_handler_.get(), nullptr /* network_device_handler */, |
| 149 nullptr /* prohibited_tecnologies_handler */); |
| 149 | 150 |
| 150 network_connection_handler_.reset(new NetworkConnectionHandler); | 151 network_connection_handler_.reset(new NetworkConnectionHandler); |
| 151 network_connection_handler_->Init(network_state_handler_.get(), | 152 network_connection_handler_->Init(network_state_handler_.get(), |
| 152 network_config_handler_.get(), | 153 network_config_handler_.get(), |
| 153 managed_config_handler_.get()); | 154 managed_config_handler_.get()); |
| 154 network_connection_observer_.reset(new TestNetworkConnectionObserver); | 155 network_connection_observer_.reset(new TestNetworkConnectionObserver); |
| 155 network_connection_handler_->AddObserver( | 156 network_connection_handler_->AddObserver( |
| 156 network_connection_observer_.get()); | 157 network_connection_observer_.get()); |
| 157 | 158 |
| 158 base::RunLoop().RunUntilIdle(); | 159 base::RunLoop().RunUntilIdle(); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 Connect(kNoNetwork); | 466 Connect(kNoNetwork); |
| 466 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, | 467 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, |
| 467 GetResultAndReset()); | 468 GetResultAndReset()); |
| 468 | 469 |
| 469 EXPECT_TRUE(Configure(kConfigConnectable)); | 470 EXPECT_TRUE(Configure(kConfigConnectable)); |
| 470 Disconnect(kWifi0); | 471 Disconnect(kWifi0); |
| 471 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); | 472 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); |
| 472 } | 473 } |
| 473 | 474 |
| 474 } // namespace chromeos | 475 } // namespace chromeos |
| OLD | NEW |