Fix issue 11006 - any plugin process started by InProcessBrowserTest was
using the unit_test executable rather than chrome.exe.  This patch repurposes
the --renderer-path switch to be --browser-subprocess-path for both plugins and
renderers.  

BUG=11006
TEST=Any InProcessBrowserTest (they all will start at least one renderer). Use
NavigateToURL to a URL containing flash, we shouldn't crash.


Review URL: http://codereview.chromium.org/99011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14951 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 4c68f57..80819b85 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -100,15 +100,16 @@
   if (command_line->HasSwitch(switches::kSingleProcess))
     RenderProcessHost::set_run_renderer_in_process(true);
 
-  // Explicitly set the path of the exe used for the renderer, otherwise it'll
-  // try to use unit_test.exe.
-  std::wstring renderer_path;
-  PathService::Get(base::FILE_EXE, &renderer_path);
-  FilePath fp_renderer_path = FilePath::FromWStringHack(renderer_path);
-  renderer_path = fp_renderer_path.DirName().ToWStringHack();
-  file_util::AppendToPath(&renderer_path,
+  // Explicitly set the path of the exe used for the renderer and plugin,
+  // otherwise they'll try to use unit_test.exe.
+  std::wstring subprocess_path;
+  PathService::Get(base::FILE_EXE, &subprocess_path);
+  FilePath fp_subprocess_path = FilePath::FromWStringHack(subprocess_path);
+  subprocess_path = fp_subprocess_path.DirName().ToWStringHack();
+  file_util::AppendToPath(&subprocess_path,
                           chrome::kBrowserProcessExecutablePath);
-  command_line->AppendSwitchWithValue(switches::kRendererPath, renderer_path);
+  command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
+                                      subprocess_path);
 
   sandbox::SandboxInterfaceInfo sandbox_info = {0};
   SandboxInitWrapper sandbox_wrapper;