diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 19:11:15 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 19:11:15 +0000 |
commit | 39703fb7cbda4ac831258c70e7fac6517125febc (patch) | |
tree | 8460f0622922154910721c7d2a698a0ea52106e5 /ipc/ipc_tests.cc | |
parent | 63dc378eac88be2da11255b61d7af140bb89ba55 (diff) | |
download | chromium_src-39703fb7cbda4ac831258c70e7fac6517125febc.zip chromium_src-39703fb7cbda4ac831258c70e7fac6517125febc.tar.gz chromium_src-39703fb7cbda4ac831258c70e7fac6517125febc.tar.bz2 |
ipc_channel: warn if someone forgets to check the result of Connect()
I found a test that was doing this.
Review URL: http://codereview.chromium.org/3759004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_tests.cc')
-rw-r--r-- | ipc/ipc_tests.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipc/ipc_tests.cc b/ipc/ipc_tests.cc index a407c70..aa30182 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(); + CHECK(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; |