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

Unified Diff: content/public/test/test_launcher.cc

Issue 17910005: Fix handling of BROWSER_WRAPPER in the test launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 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
« no previous file with comments | « base/test/test_launcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_launcher.cc
diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc
index 83b708e68e359e0a67e29035a22afd29f22748c3..9d168cf2929ff388362efe963b2946fe6412bde6 100644
--- a/content/public/test/test_launcher.cc
+++ b/content/public/test/test_launcher.cc
@@ -95,9 +95,12 @@ int DoRunTestInternal(const testing::TestCase* test_case,
new_cmd_line.AppendSwitchASCII("gtest_filter", test_name);
new_cmd_line.AppendSwitch(kSingleProcessTestsFlag);
- int exit_code = base::LaunchChildGTestProcess(new_cmd_line,
- default_timeout,
- was_timeout);
+ char* browser_wrapper = getenv("BROWSER_WRAPPER");
+ int exit_code = base::LaunchChildGTestProcess(
+ new_cmd_line,
+ browser_wrapper ? browser_wrapper : std::string(),
+ default_timeout,
+ was_timeout);
if (*was_timeout) {
LOG(ERROR) << "Test timeout (" << default_timeout.InMilliseconds()
<< " ms) exceeded for " << test_name;
@@ -130,18 +133,6 @@ int DoRunTest(TestLauncherDelegate* launcher_delegate,
}
CommandLine new_cmd_line(*CommandLine::ForCurrentProcess());
-
- const char* browser_wrapper = getenv("BROWSER_WRAPPER");
- if (browser_wrapper) {
-#if defined(OS_WIN)
- new_cmd_line.PrependWrapper(ASCIIToWide(browser_wrapper));
-#elif defined(OS_POSIX)
- new_cmd_line.PrependWrapper(browser_wrapper);
-#endif
- VLOG(1) << "BROWSER_WRAPPER was set, prefixing command_line with "
- << browser_wrapper;
- }
-
if (!launcher_delegate->AdjustChildProcessCommandLine(&new_cmd_line,
temp_dir.path())) {
return -1;
« no previous file with comments | « base/test/test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698