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

Side by Side Diff: ipc/ipc_send_fds_test.cc

Issue 10692155: Switch to TimeDelta interfaces for process waiting functions in net and ipc. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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_fuzzing_tests.cc ('k') | ipc/ipc_tests.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 #include "ipc/ipc_tests.h" 7 #include "ipc/ipc_tests.h"
8 8
9 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 extern "C" { 10 extern "C" {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ASSERT_TRUE(chan.Send(message)); 99 ASSERT_TRUE(chan.Send(message));
100 } 100 }
101 101
102 // Run message loop. 102 // Run message loop.
103 MessageLoop::current()->Run(); 103 MessageLoop::current()->Run();
104 104
105 // Close Channel so client gets its OnChannelError() callback fired. 105 // Close Channel so client gets its OnChannelError() callback fired.
106 chan.Close(); 106 chan.Close();
107 107
108 // Cleanup child process. 108 // Cleanup child process.
109 EXPECT_TRUE(base::WaitForSingleProcess(process_handle, 5000)); 109 EXPECT_TRUE(base::WaitForSingleProcess(
110 process_handle, base::TimeDelta::FromSeconds(5)));
110 } 111 }
111 112
112 int TestDescriptorClient(ino_t expected_inode_num) { 113 int TestDescriptorClient(ino_t expected_inode_num) {
113 MessageLoopForIO main_message_loop; 114 MessageLoopForIO main_message_loop;
114 MyChannelDescriptorListener listener(expected_inode_num); 115 MyChannelDescriptorListener listener(expected_inode_num);
115 116
116 // Setup IPC channel. 117 // Setup IPC channel.
117 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_CLIENT, 118 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_CLIENT,
118 &listener); 119 &listener);
119 CHECK(chan.Connect()); 120 CHECK(chan.Connect());
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_SERVER, 195 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_SERVER,
195 &listener); 196 &listener);
196 ASSERT_TRUE(chan.Connect()); 197 ASSERT_TRUE(chan.Connect());
197 198
198 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT, 199 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT,
199 &chan); 200 &chan);
200 TestDescriptorServer(chan, process_handle); 201 TestDescriptorServer(chan, process_handle);
201 } 202 }
202 203
203 #endif // defined(OS_POSIX) 204 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698