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

Unified Diff: chrome/test/out_of_proc_test_runner.cc

Issue 7284018: posix: remove LaunchAppInNewProcessGroup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 6 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
« chrome/common/launchd_mac.mm ('K') | « chrome/common/launchd_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/out_of_proc_test_runner.cc
diff --git a/chrome/test/out_of_proc_test_runner.cc b/chrome/test/out_of_proc_test_runner.cc
index fad96359a50a3b46d992e8ff80d559655ccb535a..9b230bac660998fd3567b13b121626ae98716302 100644
--- a/chrome/test/out_of_proc_test_runner.cc
+++ b/chrome/test/out_of_proc_test_runner.cc
@@ -353,6 +353,9 @@ int RunTest(const std::string& test_name, int default_timeout_ms) {
new_cmd_line.AppendSwitch(switches::kAllowFileAccess);
base::ProcessHandle process_handle;
+ base::LaunchOptions options;
+ options.process_handle = &process_handle;
+
#if defined(OS_POSIX)
const char* browser_wrapper = getenv("BROWSER_WRAPPER");
if (browser_wrapper) {
@@ -365,16 +368,12 @@ int RunTest(const std::string& test_name, int default_timeout_ms) {
// its pid. Any child processes that the test may create will inherit the
// same pgid. This way, if the test is abruptly terminated, we can clean up
// any orphaned child processes it may have left behind.
- base::environment_vector no_env;
- base::file_handle_mapping_vector no_files;
- if (!base::LaunchAppInNewProcessGroup(new_cmd_line.argv(), no_env, no_files,
- false, &process_handle))
- return false;
-#else
- if (!base::LaunchApp(new_cmd_line, false, false, &process_handle))
- return false;
+ options.new_process_group = true;
#endif
+ if (!base::LaunchProcess(new_cmd_line, options))
+ return false;
+
int timeout_ms =
test_launcher_utils::GetTestTerminationTimeout(test_name,
default_timeout_ms);
« chrome/common/launchd_mac.mm ('K') | « chrome/common/launchd_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698