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

Side by Side Diff: ipc/ipc_message_unittest.cc

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include Created 3 years, 7 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
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 "ipc/ipc_message.h" 5 #include "ipc/ipc_message.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bad_msg.WriteInt(99); 84 bad_msg.WriteInt(99);
85 iter = base::PickleIterator(bad_msg); 85 iter = base::PickleIterator(bad_msg);
86 EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output)); 86 EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
87 } 87 }
88 88
89 TEST(IPCMessageTest, DictionaryValue) { 89 TEST(IPCMessageTest, DictionaryValue) {
90 base::DictionaryValue input; 90 base::DictionaryValue input;
91 input.Set("null", base::MakeUnique<base::Value>()); 91 input.Set("null", base::MakeUnique<base::Value>());
92 input.Set("bool", new base::Value(true)); 92 input.Set("bool", new base::Value(true));
93 input.Set("int", new base::Value(42)); 93 input.Set("int", new base::Value(42));
94 input.SetWithoutPathExpansion("int.with.dot", new base::Value(43)); 94 input.SetIntegerWithoutPathExpansion("int.with.dot", 43);
95 95
96 std::unique_ptr<base::DictionaryValue> subdict(new base::DictionaryValue()); 96 std::unique_ptr<base::DictionaryValue> subdict(new base::DictionaryValue());
97 subdict->Set("str", new base::Value("forty two")); 97 subdict->Set("str", new base::Value("forty two"));
98 subdict->Set("bool", new base::Value(false)); 98 subdict->Set("bool", new base::Value(false));
99 99
100 std::unique_ptr<base::ListValue> sublist(new base::ListValue()); 100 std::unique_ptr<base::ListValue> sublist(new base::ListValue());
101 sublist->AppendDouble(42.42); 101 sublist->AppendDouble(42.42);
102 sublist->AppendString("forty"); 102 sublist->AppendString("forty");
103 sublist->AppendString("two"); 103 sublist->AppendString("two");
104 subdict->Set("list", sublist.release()); 104 subdict->Set("list", sublist.release());
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 /* TODO: handle sync IPCs 271 /* TODO: handle sync IPCs
272 TEST_F(IPCMessageParameterTest, Sync) { 272 TEST_F(IPCMessageParameterTest, Sync) {
273 std::string output; 273 std::string output;
274 TestMsgClassIS message(42, &output); 274 TestMsgClassIS message(42, &output);
275 EXPECT_TRUE(OnMessageReceived(message)); 275 EXPECT_TRUE(OnMessageReceived(message));
276 EXPECT_TRUE(called_); 276 EXPECT_TRUE(called_);
277 EXPECT_EQ(output, std::string("out")); 277 EXPECT_EQ(output, std::string("out"));
278 }*/ 278 }*/
279 279
280 } // namespace IPC 280 } // namespace IPC
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/browser_state_info_cache.cc ('k') | ipc/ipc_message_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698