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

Unified Diff: ipc/ipc_message_unittest.cc

Issue 2838893002: Remove base::ListValue::Set(size_t, base::Value*) (Closed)
Patch Set: Fix Compilation 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 | « ios/chrome/browser/notification_promo_unittest.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_unittest.cc
diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc
index 1bf52d8f9d27584eb64d381cd9470b1070803d2c..67235e32e2ce665ba270cf9f28ee1201f92b20de 100644
--- a/ipc/ipc_message_unittest.cc
+++ b/ipc/ipc_message_unittest.cc
@@ -66,9 +66,9 @@ TEST(IPCMessageTest, BasicMessageTest) {
TEST(IPCMessageTest, ListValue) {
base::ListValue input;
- input.Set(0, new base::Value(42.42));
- input.Set(1, new base::Value("forty"));
- input.Set(2, base::MakeUnique<base::Value>());
+ input.AppendDouble(42.42);
+ input.AppendString("forty");
+ input.Append(base::MakeUnique<base::Value>());
IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
IPC::WriteParam(&msg, input);
@@ -98,9 +98,9 @@ TEST(IPCMessageTest, DictionaryValue) {
subdict->Set("bool", new base::Value(false));
std::unique_ptr<base::ListValue> sublist(new base::ListValue());
- sublist->Set(0, new base::Value(42.42));
- sublist->Set(1, new base::Value("forty"));
- sublist->Set(2, new base::Value("two"));
+ sublist->AppendDouble(42.42);
+ sublist->AppendString("forty");
+ sublist->AppendString("two");
subdict->Set("list", sublist.release());
input.Set("dict", subdict.release());
« no previous file with comments | « ios/chrome/browser/notification_promo_unittest.cc ('k') | ipc/ipc_message_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698