summaryrefslogtreecommitdiffstats
path: root/chrome/test/in_process_browser_test.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 17:29:09 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 17:29:09 +0000
commiteca6a4f5c6194885dee51b9d5ffc978ef18acf51 (patch)
tree3e3ca28631e45d3094f064b9493008871a927fdb /chrome/test/in_process_browser_test.cc
parent55185493afba3b7813d44a25c614975c0bc0f32b (diff)
downloadchromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.zip
chromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.tar.gz
chromium_src-eca6a4f5c6194885dee51b9d5ffc978ef18acf51.tar.bz2
On Linux, the path to the exe is used to fork renderer processes.
This was causing the browser tests to create browser tests instead of a renderer processes. Also the SSL tests now pass on Linux and have been enabled. BUG=None TEST=Run the browser tests on Linux. Review URL: http://codereview.chromium.org/146057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.cc')
-rw-r--r--chrome/test/in_process_browser_test.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 75a9c2d..64007de 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -187,6 +187,22 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
return;
}
+
+ // Before we run the browser, we have to hack the path to the exe to match
+ // what it would be if Chrome was running, because it is used to fork renderer
+ // processes, on Linux at least (failure to do so will cause a browser_test to
+ // be run instead of a renderer).
+ FilePath chrome_path;
+ CHECK(PathService::Get(base::FILE_EXE, &chrome_path));
+ chrome_path = chrome_path.DirName();
+#if defined(OS_WIN)
+ chrome_path = chrome_path.Append(chrome::kBrowserProcessExecutablePath);
+#elif defined(OS_POSIX)
+ chrome_path = chrome_path.Append(
+ WideToASCII(chrome::kBrowserProcessExecutablePath));
+#endif
+ CHECK(PathService::Override(base::FILE_EXE, chrome_path));
+
browser_ = CreateBrowser(profile);
RunTestOnMainThread();