Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: chromeos/network/managed_network_configuration_handler_unittest.cc

Issue 708563005: Use setProperties for IP Config. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430113_internet_options_1
Patch Set: IPConfigType=Static applies to NameServer only config Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 .WillByDefault(Invoke(&profiles_stub_, 237 .WillByDefault(Invoke(&profiles_stub_,
238 &ShillProfileTestClient::GetEntry)); 238 &ShillProfileTestClient::GetEntry));
239 239
240 ON_CALL(*mock_service_client_, GetProperties(_,_)) 240 ON_CALL(*mock_service_client_, GetProperties(_,_))
241 .WillByDefault(Invoke(&services_stub_, 241 .WillByDefault(Invoke(&services_stub_,
242 &ShillServiceTestClient::GetProperties)); 242 &ShillServiceTestClient::GetProperties));
243 243
244 network_profile_handler_.reset(new TestNetworkProfileHandler()); 244 network_profile_handler_.reset(new TestNetworkProfileHandler());
245 network_configuration_handler_.reset( 245 network_configuration_handler_.reset(
246 NetworkConfigurationHandler::InitializeForTest( 246 NetworkConfigurationHandler::InitializeForTest(
247 NULL /* no NetworkStateHandler */)); 247 NULL /* no NetworkStateHandler */,
248 NULL /* no NetworkDeviceHandler */));
248 managed_network_configuration_handler_.reset( 249 managed_network_configuration_handler_.reset(
249 new ManagedNetworkConfigurationHandlerImpl()); 250 new ManagedNetworkConfigurationHandlerImpl());
250 managed_network_configuration_handler_->Init( 251 managed_network_configuration_handler_->Init(
251 NULL /* no NetworkStateHandler */, 252 NULL /* no NetworkStateHandler */,
252 network_profile_handler_.get(), 253 network_profile_handler_.get(),
253 network_configuration_handler_.get(), 254 network_configuration_handler_.get(),
254 NULL /* no DeviceHandler */); 255 NULL /* no DeviceHandler */);
255 managed_network_configuration_handler_->AddObserver(&policy_observer_); 256 managed_network_configuration_handler_->AddObserver(&policy_observer_);
256 257
257 message_loop_.RunUntilIdle(); 258 message_loop_.RunUntilIdle();
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 EXPECT_CALL(*mock_profile_client_, 995 EXPECT_CALL(*mock_profile_client_,
995 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); 996 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _));
996 997
997 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); 998 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc");
998 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); 999 managed_network_configuration_handler_->RemoveObserver(&policy_observer_);
999 managed_network_configuration_handler_.reset(); 1000 managed_network_configuration_handler_.reset();
1000 message_loop_.RunUntilIdle(); 1001 message_loop_.RunUntilIdle();
1001 } 1002 }
1002 1003
1003 } // namespace chromeos 1004 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698