OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/launcher/test_launcher.h" | 5 #include "base/test/launcher/test_launcher.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void DoLaunchChildTestProcess( | 241 void DoLaunchChildTestProcess( |
242 const CommandLine& command_line, | 242 const CommandLine& command_line, |
243 base::TimeDelta timeout, | 243 base::TimeDelta timeout, |
244 bool redirect_stdio, | 244 bool redirect_stdio, |
245 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 245 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
246 const TestLauncher::LaunchChildGTestProcessCallback& callback) { | 246 const TestLauncher::LaunchChildGTestProcessCallback& callback) { |
247 TimeTicks start_time = TimeTicks::Now(); | 247 TimeTicks start_time = TimeTicks::Now(); |
248 | 248 |
249 // Redirect child process output to a file. | 249 // Redirect child process output to a file. |
250 base::FilePath output_file; | 250 base::FilePath output_file; |
251 CHECK(file_util::CreateTemporaryFile(&output_file)); | 251 CHECK(base::CreateTemporaryFile(&output_file)); |
252 | 252 |
253 LaunchOptions options; | 253 LaunchOptions options; |
254 #if defined(OS_WIN) | 254 #if defined(OS_WIN) |
255 win::ScopedHandle handle; | 255 win::ScopedHandle handle; |
256 | 256 |
257 if (redirect_stdio) { | 257 if (redirect_stdio) { |
258 // Make the file handle inheritable by the child. | 258 // Make the file handle inheritable by the child. |
259 SECURITY_ATTRIBUTES sa_attr; | 259 SECURITY_ATTRIBUTES sa_attr; |
260 sa_attr.nLength = sizeof(SECURITY_ATTRIBUTES); | 260 sa_attr.nLength = sizeof(SECURITY_ATTRIBUTES); |
261 sa_attr.lpSecurityDescriptor = NULL; | 261 sa_attr.lpSecurityDescriptor = NULL; |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 | 987 |
988 g_live_processes.Get().erase(process_handle); | 988 g_live_processes.Get().erase(process_handle); |
989 } | 989 } |
990 | 990 |
991 base::CloseProcessHandle(process_handle); | 991 base::CloseProcessHandle(process_handle); |
992 | 992 |
993 return exit_code; | 993 return exit_code; |
994 } | 994 } |
995 | 995 |
996 } // namespace base | 996 } // namespace base |
OLD | NEW |