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

Side by Side Diff: ipc/ipc_channel_unittest.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_win.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 16 matching lines...) Expand all
27 TEST_F(IPCChannelTest, BasicMessageTest) { 27 TEST_F(IPCChannelTest, BasicMessageTest) {
28 int v1 = 10; 28 int v1 = 10;
29 std::string v2("foobar"); 29 std::string v2("foobar");
30 base::string16 v3(base::ASCIIToUTF16("hello world")); 30 base::string16 v3(base::ASCIIToUTF16("hello world"));
31 31
32 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); 32 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL);
33 EXPECT_TRUE(m.WriteInt(v1)); 33 EXPECT_TRUE(m.WriteInt(v1));
34 EXPECT_TRUE(m.WriteString(v2)); 34 EXPECT_TRUE(m.WriteString(v2));
35 EXPECT_TRUE(m.WriteString16(v3)); 35 EXPECT_TRUE(m.WriteString16(v3));
36 36
37 PickleIterator iter(m); 37 base::PickleIterator iter(m);
38 38
39 int vi; 39 int vi;
40 std::string vs; 40 std::string vs;
41 base::string16 vs16; 41 base::string16 vs16;
42 42
43 EXPECT_TRUE(iter.ReadInt(&vi)); 43 EXPECT_TRUE(iter.ReadInt(&vi));
44 EXPECT_EQ(v1, vi); 44 EXPECT_EQ(v1, vi);
45 45
46 EXPECT_TRUE(iter.ReadString(&vs)); 46 EXPECT_TRUE(iter.ReadString(&vs));
47 EXPECT_EQ(v2, vs); 47 EXPECT_EQ(v2, vs);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 &listener)); 194 &listener));
195 CHECK(channel->Connect()); 195 CHECK(channel->Connect());
196 listener.Init(channel.get()); 196 listener.Init(channel.get());
197 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); 197 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child");
198 198
199 base::MessageLoop::current()->Run(); 199 base::MessageLoop::current()->Run();
200 return 0; 200 return 0;
201 } 201 }
202 202
203 } // namespace 203 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698