summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:19:18 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 18:19:18 +0000
commit6cea14dada365d77ff6a86838b0258ab5663a7c6 (patch)
tree0ae35e04e7a038473c795aa25096251e6ec18101 /chrome/test
parenteafb5b7bf242e8ebd9c947012ca404dd904bc1bd (diff)
downloadchromium_src-6cea14dada365d77ff6a86838b0258ab5663a7c6.zip
chromium_src-6cea14dada365d77ff6a86838b0258ab5663a7c6.tar.gz
chromium_src-6cea14dada365d77ff6a86838b0258ab5663a7c6.tar.bz2
Improves a code block in in_process_browser_test, avoids the use of FilePath::FromWStringHack and the use of a deprecated function.
Patch by tfarina. BUG=None TEST=run browser_tests.exe Review URL: http://codereview.chromium.org/192035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/in_process_browser_test.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index a20c828..af63adb 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -111,14 +111,13 @@ void InProcessBrowserTest::SetUp() {
// 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;
+ FilePath 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);
+ subprocess_path = subprocess_path.DirName();
+ subprocess_path = subprocess_path.AppendASCII(WideToASCII(
+ chrome::kBrowserProcessExecutablePath));
command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
- subprocess_path);
+ subprocess_path.ToWStringHack());
// Enable warning level logging so that we can see when bad stuff happens.
command_line->AppendSwitch(switches::kEnableLogging);