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

Unified Diff: ipc/ipc_tests.cc

Issue 3759004: ipc_channel: warn if someone forgets to check the result of Connect() (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fixes Created 10 years, 2 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 | « ipc/ipc_send_fds_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_tests.cc
diff --git a/ipc/ipc_tests.cc b/ipc/ipc_tests.cc
index a407c70a79e775af9e8108794c75d6ccdfc791b8..6edb393cb0f8be187170d85a626c85c1892b4a3d 100644
--- a/ipc/ipc_tests.cc
+++ b/ipc/ipc_tests.cc
@@ -219,7 +219,7 @@ TEST_F(IPCChannelTest, ChannelTest) {
// Setup IPC channel.
IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_SERVER,
&channel_listener);
- chan.Connect();
+ ASSERT_TRUE(chan.Connect());
channel_listener.Init(&chan);
@@ -334,7 +334,7 @@ TEST_F(IPCChannelTest, SendMessageInChannelConnected) {
IPC::Channel channel(kTestClientChannel, IPC::Channel::MODE_SERVER,
&channel_listener);
channel_listener.Init(&channel);
- channel.Connect();
+ ASSERT_TRUE(channel.Connect());
base::ProcessHandle process_handle = SpawnChild(TEST_CLIENT, &channel);
ASSERT_TRUE(process_handle);
@@ -359,7 +359,7 @@ MULTIPROCESS_TEST_MAIN(RunTestClient) {
// setup IPC channel
IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_CLIENT,
&channel_listener);
- chan.Connect();
+ ASSERT_TRUE(chan.Connect());
channel_listener.Init(&chan);
Send(&chan, "hello from child");
// run message loop
@@ -492,7 +492,7 @@ TEST_F(IPCChannelTest, Performance) {
IPC::Channel chan(kReflectorChannel, IPC::Channel::MODE_SERVER, NULL);
ChannelPerfListener perf_listener(&chan, 10000, 100000);
chan.set_listener(&perf_listener);
- chan.Connect();
+ ASSERT_TRUE(chan.Connect());
HANDLE process = SpawnChild(TEST_REFLECTOR, &chan);
ASSERT_TRUE(process);
@@ -524,7 +524,7 @@ MULTIPROCESS_TEST_MAIN(RunReflector) {
IPC::Channel chan(kReflectorChannel, IPC::Channel::MODE_CLIENT, NULL);
ChannelReflectorListener channel_reflector_listener(&chan);
chan.set_listener(&channel_reflector_listener);
- chan.Connect();
+ ASSERT_TRUE(chan.Connect());
MessageLoop::current()->Run();
return true;
« no previous file with comments | « ipc/ipc_send_fds_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698