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

Unified Diff: chromeos/dbus/shill_manager_client_unittest.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/shill_ipconfig_client_unittest.cc ('k') | chromeos/dbus/shill_profile_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_manager_client_unittest.cc
diff --git a/chromeos/dbus/shill_manager_client_unittest.cc b/chromeos/dbus/shill_manager_client_unittest.cc
index 67e2c7cc937e317c169a56bae8b1aaca396c121f..4051c36271b738c09962b87471f9ba2ba2c17a62 100644
--- a/chromeos/dbus/shill_manager_client_unittest.cc
+++ b/chromeos/dbus/shill_manager_client_unittest.cc
@@ -139,8 +139,7 @@ TEST_F(ShillManagerClientTest, GetProperties) {
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
- new base::Value(true));
+ value.SetBooleanWithoutPathExpansion(shill::kOfflineModeProperty, true);
// Set expectations.
PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
@@ -181,12 +180,12 @@ TEST_F(ShillManagerClientTest, GetNetworksForGeolocation) {
// Create the expected value.
base::DictionaryValue type_dict_value;
- base::ListValue* type_entry_value = new base::ListValue;
+ auto type_entry_value = base::MakeUnique<base::ListValue>();
auto property_dict_value = base::MakeUnique<base::DictionaryValue>();
- property_dict_value->SetWithoutPathExpansion(
- shill::kGeoMacAddressProperty, new base::Value("01:23:45:67:89:AB"));
+ property_dict_value->SetStringWithoutPathExpansion(
+ shill::kGeoMacAddressProperty, "01:23:45:67:89:AB");
type_entry_value->Append(std::move(property_dict_value));
- type_dict_value.SetWithoutPathExpansion("wifi", type_entry_value);
+ type_dict_value.SetWithoutPathExpansion("wifi", std::move(type_entry_value));
// Set expectations.
PrepareForMethodCall(shill::kGetNetworksForGeolocation,
« no previous file with comments | « chromeos/dbus/shill_ipconfig_client_unittest.cc ('k') | chromeos/dbus/shill_profile_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698