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

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

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique Created 4 years, 2 months 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
« no previous file with comments | « chromeos/dbus/shill_profile_client_unittest.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 EXPECT_EQ(0, test_observer_->PropertyUpdatesForService( 780 EXPECT_EQ(0, test_observer_->PropertyUpdatesForService(
781 kShillManagerClientStubDefaultWifi)); 781 kShillManagerClientStubDefaultWifi));
782 782
783 // Change IPConfigs property. 783 // Change IPConfigs property.
784 ShillIPConfigClient::TestInterface* ip_config_test = 784 ShillIPConfigClient::TestInterface* ip_config_test =
785 DBusThreadManager::Get()->GetShillIPConfigClient()->GetTestInterface(); 785 DBusThreadManager::Get()->GetShillIPConfigClient()->GetTestInterface();
786 const std::string kIPConfigPath = "test_ip_config"; 786 const std::string kIPConfigPath = "test_ip_config";
787 base::DictionaryValue ip_config_properties; 787 base::DictionaryValue ip_config_properties;
788 ip_config_test->AddIPConfig(kIPConfigPath, ip_config_properties); 788 ip_config_test->AddIPConfig(kIPConfigPath, ip_config_properties);
789 base::ListValue device_ip_configs; 789 base::ListValue device_ip_configs;
790 device_ip_configs.Append(new base::StringValue(kIPConfigPath)); 790 device_ip_configs.AppendString(kIPConfigPath);
791 device_test_->SetDeviceProperty( 791 device_test_->SetDeviceProperty(
792 kShillManagerClientStubWifiDevice, shill::kIPConfigsProperty, 792 kShillManagerClientStubWifiDevice, shill::kIPConfigsProperty,
793 device_ip_configs); 793 device_ip_configs);
794 service_test_->SetServiceProperty( 794 service_test_->SetServiceProperty(
795 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty, 795 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty,
796 base::StringValue(kIPConfigPath)); 796 base::StringValue(kIPConfigPath));
797 UpdateManagerProperties(); 797 UpdateManagerProperties();
798 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice( 798 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice(
799 kShillManagerClientStubWifiDevice)); 799 kShillManagerClientStubWifiDevice));
800 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService( 800 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService(
801 kShillManagerClientStubDefaultWifi)); 801 kShillManagerClientStubDefaultWifi));
802 } 802 }
803 803
804 } // namespace chromeos 804 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_profile_client_unittest.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698