| Index: chrome/test/in_process_browser_test.cc
|
| ===================================================================
|
| --- chrome/test/in_process_browser_test.cc (revision 19071)
|
| +++ chrome/test/in_process_browser_test.cc (working copy)
|
| @@ -187,13 +187,28 @@
|
| 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();
|
|
|
| - BrowserList::const_reverse_iterator browser =
|
| - BrowserList::begin_last_active();
|
| - for (; browser != BrowserList::end_last_active(); ++browser)
|
| + BrowserList::const_iterator browser = BrowserList::begin();
|
| + for (; browser != BrowserList::end(); ++browser)
|
| (*browser)->CloseAllTabs();
|
|
|
| // Stop the HTTP server.
|
|
|