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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 5 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 | « chrome/test/automation/automation_proxy_uitest.cc ('k') | chrome/test/memory_test/memory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/in_process_browser_test.cc
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index f2c410dc26ad0c93cfc3ff3a0f92cee21c4a2b2d..b5709fb1d44bdbfbf5d2a0bfb289a4235fbead39 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -135,15 +135,13 @@ void InProcessBrowserTest::SetUp() {
// Turn off tip loading for tests; see http://crbug.com/17725
command_line->AppendSwitch(switches::kDisableWebResources);
- command_line->AppendSwitchWithValue(switches::kUserDataDir,
- user_data_dir.ToWStringHack());
+ command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
// Don't show the first run ui.
command_line->AppendSwitch(switches::kNoFirstRun);
// This is a Browser test.
- command_line->AppendSwitchWithValue(switches::kTestType,
- ASCIIToWide(kBrowserTestType));
+ command_line->AppendSwitchWithValue(switches::kTestType, kBrowserTestType);
// Single-process mode is not set in BrowserMain so it needs to be processed
// explicitly.
@@ -154,8 +152,8 @@ void InProcessBrowserTest::SetUp() {
#if defined(OS_WIN)
// The Windows sandbox requires that the browser and child processes are the
// same binary. So we launch browser_process.exe which loads chrome.dll
- command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
- command_line->GetProgram().value());
+ command_line->AppendSwitchPath(switches::kBrowserSubprocessPath,
+ command_line->GetProgram());
#else
// Explicitly set the path of the binary used for child processes, otherwise
// they'll try to use browser_tests which doesn't contain ChromeMain.
@@ -164,8 +162,8 @@ void InProcessBrowserTest::SetUp() {
subprocess_path = subprocess_path.DirName();
subprocess_path = subprocess_path.AppendASCII(WideToASCII(
chrome::kBrowserProcessExecutablePath));
- command_line->AppendSwitchWithValue(switches::kBrowserSubprocessPath,
- subprocess_path.ToWStringHack());
+ command_line->AppendSwitchPath(switches::kBrowserSubprocessPath,
+ subprocess_path);
#endif
// Enable warning level logging so that we can see when bad stuff happens.
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.cc ('k') | chrome/test/memory_test/memory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698