diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 01:46:59 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 01:46:59 +0000 |
commit | ed578097fa1a348906fdd74ea32bf140c8f75071 (patch) | |
tree | 46decb9874a9573f64a3a86893a7dec063fa97fb /chrome/test/ui/ui_test_suite.cc | |
parent | abb4e8e1ecd63ce8d80e7ab514b748c2cbf201b8 (diff) | |
download | chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.zip chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.tar.gz chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.tar.bz2 |
Remove GetSwitchValue() from chrome/* where easy.
Review URL: http://codereview.chromium.org/3057033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test_suite.cc')
-rw-r--r-- | chrome/test/ui/ui_test_suite.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc index 934a8e9..fd83857 100644 --- a/chrome/test/ui/ui_test_suite.cc +++ b/chrome/test/ui/ui_test_suite.cc @@ -49,26 +49,26 @@ void UITestSuite::Initialize() { parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK)); UITest::set_disable_breakpad( parsed_command_line.HasSwitch(switches::kDisableBreakpad)); - std::wstring test_timeout = - parsed_command_line.GetSwitchValue(UITestSuite::kTestTimeout); + std::string test_timeout = + parsed_command_line.GetSwitchValueASCII(UITestSuite::kTestTimeout); if (!test_timeout.empty()) { int timeout; - base::StringToInt(WideToUTF8(test_timeout), &timeout); + base::StringToInt(test_timeout, &timeout); UITest::set_test_timeout_ms(timeout); } #if defined(OS_WIN) int batch_count = 0; int batch_index = 0; - std::wstring batch_count_str = - parsed_command_line.GetSwitchValue(UITestSuite::kBatchCount); + std::string batch_count_str = + parsed_command_line.GetSwitchValueASCII(UITestSuite::kBatchCount); if (!batch_count_str.empty()) { - base::StringToInt(WideToUTF16Hack(batch_count_str), &batch_count); + base::StringToInt(batch_count_str, &batch_count); } - std::wstring batch_index_str = - parsed_command_line.GetSwitchValue(UITestSuite::kBatchIndex); + std::string batch_index_str = + parsed_command_line.GetSwitchValueASCII(UITestSuite::kBatchIndex); if (!batch_index_str.empty()) { - base::StringToInt(WideToUTF16Hack(batch_index_str), &batch_index); + base::StringToInt(batch_index_str, &batch_index); } if (batch_count > 0 && batch_index >= 0 && batch_index < batch_count) { // Running UI test in parallel. Gtest supports running tests in shards, @@ -76,9 +76,9 @@ void UITestSuite::Initialize() { // Thus all we need to do is to set up environment variables for gtest. // See http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide. std::string batch_count_env(UITestSuite::kGTestTotalShards); - batch_count_env.append(WideToASCII(batch_count_str)); + batch_count_env.append(batch_count_str); std::string batch_index_env(UITestSuite::kGTestShardIndex); - batch_index_env.append(WideToASCII(batch_index_str)); + batch_index_env.append(batch_index_str); _putenv(batch_count_env.c_str()); _putenv(batch_index_env.c_str()); } |