| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <iostream> | 5 #include <iostream> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 managed_network_configuration_handler_->Init( | 268 managed_network_configuration_handler_->Init( |
| 269 network_state_handler_.get(), network_profile_handler_.get(), | 269 network_state_handler_.get(), network_profile_handler_.get(), |
| 270 network_configuration_handler_.get(), nullptr /* no DeviceHandler */, | 270 network_configuration_handler_.get(), nullptr /* no DeviceHandler */, |
| 271 nullptr /* no ProhibitedTechnologiesHandler */); | 271 nullptr /* no ProhibitedTechnologiesHandler */); |
| 272 managed_network_configuration_handler_->AddObserver(&policy_observer_); | 272 managed_network_configuration_handler_->AddObserver(&policy_observer_); |
| 273 | 273 |
| 274 base::RunLoop().RunUntilIdle(); | 274 base::RunLoop().RunUntilIdle(); |
| 275 } | 275 } |
| 276 | 276 |
| 277 void TearDown() override { | 277 void TearDown() override { |
| 278 network_state_handler_->Shutdown(); |
| 278 if (managed_network_configuration_handler_) | 279 if (managed_network_configuration_handler_) |
| 279 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); | 280 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); |
| 280 network_state_handler_.reset(); | |
| 281 managed_network_configuration_handler_.reset(); | 281 managed_network_configuration_handler_.reset(); |
| 282 network_configuration_handler_.reset(); | 282 network_configuration_handler_.reset(); |
| 283 network_profile_handler_.reset(); | 283 network_profile_handler_.reset(); |
| 284 network_state_handler_.reset(); |
| 284 DBusThreadManager::Shutdown(); | 285 DBusThreadManager::Shutdown(); |
| 285 } | 286 } |
| 286 | 287 |
| 287 void VerifyAndClearExpectations() { | 288 void VerifyAndClearExpectations() { |
| 288 Mock::VerifyAndClearExpectations(mock_manager_client_); | 289 Mock::VerifyAndClearExpectations(mock_manager_client_); |
| 289 Mock::VerifyAndClearExpectations(mock_profile_client_); | 290 Mock::VerifyAndClearExpectations(mock_profile_client_); |
| 290 SetNetworkConfigurationHandlerExpectations(); | 291 SetNetworkConfigurationHandlerExpectations(); |
| 291 } | 292 } |
| 292 | 293 |
| 293 void InitializeStandardProfiles() { | 294 void InitializeStandardProfiles() { |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 EXPECT_CALL(*mock_profile_client_, | 979 EXPECT_CALL(*mock_profile_client_, |
| 979 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); | 980 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); |
| 980 | 981 |
| 981 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); | 982 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); |
| 982 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); | 983 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); |
| 983 managed_network_configuration_handler_.reset(); | 984 managed_network_configuration_handler_.reset(); |
| 984 base::RunLoop().RunUntilIdle(); | 985 base::RunLoop().RunUntilIdle(); |
| 985 } | 986 } |
| 986 | 987 |
| 987 } // namespace chromeos | 988 } // namespace chromeos |
| OLD | NEW |