diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 21:45:17 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 21:45:17 +0000 |
commit | 9f308ae7b39912090955910e76753aa0823461e3 (patch) | |
tree | 1600f6c38f3113c692e372e34701eb39b3e518c9 /chrome/test | |
parent | a91d639d609db7e4c9ae2ccad3fe1039608c45ff (diff) | |
download | chromium_src-9f308ae7b39912090955910e76753aa0823461e3.zip chromium_src-9f308ae7b39912090955910e76753aa0823461e3.tar.gz chromium_src-9f308ae7b39912090955910e76753aa0823461e3.tar.bz2 |
Use GetSwitchValuePath.
BUG=24672
TEST=unit_tests
Patch by Thiago Farina <thiago.farina@gmail.com>.
Review URL: http://codereview.chromium.org/375016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_tests.cc | 6 | ||||
-rw-r--r-- | chrome/test/memory_test/memory_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 19 |
3 files changed, 11 insertions, 20 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc index b4c8c29..ae7df5d 100644 --- a/chrome/test/automated_ui_tests/automated_ui_tests.cc +++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc @@ -73,8 +73,7 @@ void SilentRuntimeReportHandler(const std::string& str) { FilePath GetInputFilePath() { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(kInputFilePathSwitch)) { - return FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kInputFilePathSwitch)); + return parsed_command_line.GetSwitchValuePath(kInputFilePathSwitch); } else { return FilePath(kDefaultInputFilePath); } @@ -83,8 +82,7 @@ FilePath GetInputFilePath() { FilePath GetOutputFilePath() { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(kOutputFilePathSwitch)) { - return FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kOutputFilePathSwitch)); + return parsed_command_line.GetSwitchValuePath(kOutputFilePathSwitch); } else { return FilePath(kDefaultOutputFilePath); } diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc index 40920ee..966a999 100644 --- a/chrome/test/memory_test/memory_test.cc +++ b/chrome/test/memory_test/memory_test.cc @@ -83,9 +83,9 @@ class MemoryTest : public UITest { launch_arguments_.AppendSwitch(switches::kNoEvents); // Get the specified user data dir (optional) - FilePath profile_dir = FilePath::FromWStringHack( - CommandLine::ForCurrentProcess()->GetSwitchValue( - switches::kUserDataDir)); + FilePath profile_dir = + CommandLine::ForCurrentProcess()->GetSwitchValuePath( + switches::kUserDataDir); if (profile_dir.empty()) { if (!SetupTempDirectory(GetUserDataDirSource())) { diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index ef7f66d..a4d0e5f 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -667,10 +667,8 @@ void SetPageRange(const CommandLine& parsed_command_line) { ASSERT_TRUE(g_end_index >= g_start_index); - if (parsed_command_line.HasSwitch(kListSwitch)) { - g_url_file_path = FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kListSwitch)); - } + if (parsed_command_line.HasSwitch(kListSwitch)) + g_url_file_path = parsed_command_line.GetSwitchValuePath(kListSwitch); if (parsed_command_line.HasSwitch(kIterationSwitch)) { ASSERT_TRUE( @@ -690,11 +688,8 @@ void SetPageRange(const CommandLine& parsed_command_line) { parsed_command_line.GetSwitchValue(kEndURLSwitch)); } - if (parsed_command_line.HasSwitch(kLogFileSwitch)) { - g_log_file_path = - FilePath::FromWStringHack( - parsed_command_line.GetSwitchValue(kLogFileSwitch)); - } + if (parsed_command_line.HasSwitch(kLogFileSwitch)) + g_log_file_path = parsed_command_line.GetSwitchValuePath(kLogFileSwitch); if (parsed_command_line.HasSwitch(kTimeoutSwitch)) { ASSERT_TRUE( @@ -721,11 +716,9 @@ void SetPageRange(const CommandLine& parsed_command_line) { CommandLine v8_command_line( parsed_command_line.GetSwitchValuePath(switches::kJavaScriptFlags)); if (v8_command_line.HasSwitch(kV8LogFileSwitch)) { - g_v8_log_path = FilePath::FromWStringHack( - v8_command_line.GetSwitchValue(kV8LogFileSwitch)); - if (!file_util::AbsolutePath(&g_v8_log_path)) { + g_v8_log_path = v8_command_line.GetSwitchValuePath(kV8LogFileSwitch); + if (!file_util::AbsolutePath(&g_v8_log_path)) g_v8_log_path = FilePath(); - } } } } |