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

Unified Diff: chromeos/dbus/shill_profile_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_manager_client_unittest.cc ('k') | chromeos/dbus/shill_service_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_profile_client_unittest.cc
diff --git a/chromeos/dbus/shill_profile_client_unittest.cc b/chromeos/dbus/shill_profile_client_unittest.cc
index 24932cc25c28407196360eb8e2c83751702792bd..eb17a9a42c0702e251321ba1b46c6e5a3fa463a4 100644
--- a/chromeos/dbus/shill_profile_client_unittest.cc
+++ b/chromeos/dbus/shill_profile_client_unittest.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
#include "base/values.h"
@@ -107,10 +110,10 @@ TEST_F(ShillProfileClientTest, GetProperties) {
writer.CloseContainer(&array_writer);
// Create the expected value.
- base::ListValue* entries = new base::ListValue;
+ auto entries = base::MakeUnique<base::ListValue>();
entries->AppendString(kExampleEntryPath);
base::DictionaryValue value;
- value.SetWithoutPathExpansion(shill::kEntriesProperty, entries);
+ value.SetWithoutPathExpansion(shill::kEntriesProperty, std::move(entries));
// Set expectations.
PrepareForMethodCall(shill::kGetPropertiesFunction,
base::Bind(&ExpectNoArgument),
@@ -142,8 +145,7 @@ TEST_F(ShillProfileClientTest, GetEntry) {
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(shill::kTypeProperty,
- new base::Value(shill::kTypeWifi));
+ value.SetStringWithoutPathExpansion(shill::kTypeProperty, shill::kTypeWifi);
// Set expectations.
PrepareForMethodCall(shill::kGetEntryFunction,
base::Bind(&ExpectStringArgument, kExampleEntryPath),
@@ -165,8 +167,7 @@ TEST_F(ShillProfileClientTest, DeleteEntry) {
// Create the expected value.
base::DictionaryValue value;
- value.SetWithoutPathExpansion(shill::kOfflineModeProperty,
- new base::Value(true));
+ value.SetBooleanWithoutPathExpansion(shill::kOfflineModeProperty, true);
// Set expectations.
PrepareForMethodCall(shill::kDeleteEntryFunction,
base::Bind(&ExpectStringArgument, kExampleEntryPath),
« no previous file with comments | « chromeos/dbus/shill_manager_client_unittest.cc ('k') | chromeos/dbus/shill_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698