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

Side by Side Diff: ipc/ipc_channel_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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_mojo_unittest.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 "base/run_loop.h"
5 #include "build/build_config.h" 6 #include "build/build_config.h"
6 7
7 #if defined(OS_WIN) 8 #if defined(OS_WIN)
8 #include <windows.h> 9 #include <windows.h>
9 #endif 10 #endif
10 11
11 #include <stdint.h> 12 #include <stdint.h>
12 13
13 #include <memory> 14 #include <memory>
14 #include <string> 15 #include <string>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 CloseHandle(pipe); // The channel duplicates the handle. 72 CloseHandle(pipe); // The channel duplicates the handle.
72 listener.Init(sender()); 73 listener.Init(sender());
73 74
74 // Connect to channel and start client. 75 // Connect to channel and start client.
75 ASSERT_TRUE(ConnectChannel()); 76 ASSERT_TRUE(ConnectChannel());
76 ASSERT_TRUE(StartClient()); 77 ASSERT_TRUE(StartClient());
77 78
78 IPC::TestChannelListener::SendOneMessage(sender(), "hello from parent"); 79 IPC::TestChannelListener::SendOneMessage(sender(), "hello from parent");
79 80
80 // Run message loop. 81 // Run message loop.
81 base::MessageLoop::current()->Run(); 82 base::RunLoop().Run();
82 83
83 // Close the channel so the client's OnChannelError() gets fired. 84 // Close the channel so the client's OnChannelError() gets fired.
84 channel()->Close(); 85 channel()->Close();
85 86
86 EXPECT_TRUE(WaitForClientShutdown()); 87 EXPECT_TRUE(WaitForClientShutdown());
87 DestroyChannel(); 88 DestroyChannel();
88 } 89 }
89 #endif // defined (OS_WIN) 90 #endif // defined (OS_WIN)
90 91
91 TEST_F(IPCChannelTest, ChannelProxyTest) { 92 TEST_F(IPCChannelTest, ChannelProxyTest) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 main_message_loop.task_runner())); 166 main_message_loop.task_runner()));
166 CHECK(channel->Connect()); 167 CHECK(channel->Connect());
167 listener.Init(channel.get()); 168 listener.Init(channel.get());
168 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child"); 169 IPC::TestChannelListener::SendOneMessage(channel.get(), "hello from child");
169 170
170 base::RunLoop().Run(); 171 base::RunLoop().Run();
171 return 0; 172 return 0;
172 } 173 }
173 174
174 } // namespace 175 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_channel_mojo_unittest.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698