| 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 <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 ~ManagedNetworkConfigurationHandlerTest() override {} | 230 ~ManagedNetworkConfigurationHandlerTest() override {} |
| 231 | 231 |
| 232 void SetUp() override { | 232 void SetUp() override { |
| 233 scoped_ptr<DBusThreadManagerSetter> dbus_setter = | 233 scoped_ptr<DBusThreadManagerSetter> dbus_setter = |
| 234 DBusThreadManager::GetSetterForTesting(); | 234 DBusThreadManager::GetSetterForTesting(); |
| 235 mock_manager_client_ = new StrictMock<MockShillManagerClient>(); | 235 mock_manager_client_ = new StrictMock<MockShillManagerClient>(); |
| 236 mock_profile_client_ = new StrictMock<MockShillProfileClient>(); | 236 mock_profile_client_ = new StrictMock<MockShillProfileClient>(); |
| 237 mock_service_client_ = new StrictMock<MockShillServiceClient>(); | 237 mock_service_client_ = new StrictMock<MockShillServiceClient>(); |
| 238 dbus_setter->SetShillManagerClient( | 238 dbus_setter->SetShillManagerClient( |
| 239 scoped_ptr<ShillManagerClient>(mock_manager_client_).Pass()); | 239 scoped_ptr<ShillManagerClient>(mock_manager_client_)); |
| 240 dbus_setter->SetShillProfileClient( | 240 dbus_setter->SetShillProfileClient( |
| 241 scoped_ptr<ShillProfileClient>(mock_profile_client_).Pass()); | 241 scoped_ptr<ShillProfileClient>(mock_profile_client_)); |
| 242 dbus_setter->SetShillServiceClient( | 242 dbus_setter->SetShillServiceClient( |
| 243 scoped_ptr<ShillServiceClient>(mock_service_client_).Pass()); | 243 scoped_ptr<ShillServiceClient>(mock_service_client_)); |
| 244 | 244 |
| 245 SetNetworkConfigurationHandlerExpectations(); | 245 SetNetworkConfigurationHandlerExpectations(); |
| 246 | 246 |
| 247 ON_CALL(*mock_profile_client_, GetProperties(_,_,_)) | 247 ON_CALL(*mock_profile_client_, GetProperties(_,_,_)) |
| 248 .WillByDefault(Invoke(&profiles_stub_, | 248 .WillByDefault(Invoke(&profiles_stub_, |
| 249 &ShillProfileTestClient::GetProperties)); | 249 &ShillProfileTestClient::GetProperties)); |
| 250 | 250 |
| 251 ON_CALL(*mock_profile_client_, GetEntry(_,_,_,_)) | 251 ON_CALL(*mock_profile_client_, GetEntry(_,_,_,_)) |
| 252 .WillByDefault(Invoke(&profiles_stub_, | 252 .WillByDefault(Invoke(&profiles_stub_, |
| 253 &ShillProfileTestClient::GetEntry)); | 253 &ShillProfileTestClient::GetEntry)); |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 EXPECT_CALL(*mock_profile_client_, | 977 EXPECT_CALL(*mock_profile_client_, |
| 978 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); | 978 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); |
| 979 | 979 |
| 980 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); | 980 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); |
| 981 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); | 981 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); |
| 982 managed_network_configuration_handler_.reset(); | 982 managed_network_configuration_handler_.reset(); |
| 983 message_loop_.RunUntilIdle(); | 983 message_loop_.RunUntilIdle(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace chromeos | 986 } // namespace chromeos |
| OLD | NEW |