diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 23:12:06 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 23:12:06 +0000 |
commit | f6d7389ff93180213b0828b702bee0163807cb49 (patch) | |
tree | 98ff0e889f179ba7865564cf0dddf8b87dd551fd /webkit/tools | |
parent | 0cf723585ee607ba7467eb55b74940d52f6d582e (diff) | |
download | chromium_src-f6d7389ff93180213b0828b702bee0163807cb49.zip chromium_src-f6d7389ff93180213b0828b702bee0163807cb49.tar.gz chromium_src-f6d7389ff93180213b0828b702bee0163807cb49.tar.bz2 |
Remove use of CommandLine::GetSwitchValue() from webkit/.
Review URL: http://codereview.chromium.org/2819095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/node_leak_test.cc | 11 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc index 7dee5aa..13ab6b21 100644 --- a/webkit/tools/test_shell/node_leak_test.cc +++ b/webkit/tools/test_shell/node_leak_test.cc @@ -41,11 +41,10 @@ class NodeLeakTest : public TestShellTest { } if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { - const std::wstring timeout_str = parsed_command_line.GetSwitchValue( + const std::string timeout_str = parsed_command_line.GetSwitchValueASCII( test_shell::kTestShellTimeOut); int timeout_ms; - if (base::StringToInt(WideToUTF8(timeout_str), &timeout_ms) && - timeout_ms > 0) + if (base::StringToInt(timeout_str, &timeout_ms) && timeout_ms > 0) TestShell::SetFileTestTimeout(timeout_ms); } @@ -64,8 +63,8 @@ class NodeLeakTest : public TestShellTest { SimpleResourceLoaderBridge::Shutdown(); } - void NavigateToURL(const std::wstring& test_url) { - test_shell_->LoadURL(GURL(WideToUTF8(test_url))); + void NavigateToURL(const std::string& test_url) { + test_shell_->LoadURL(GURL(test_url)); test_shell_->WaitTestFinished(); // Depends on TestShellTests::TearDown to load blank page and @@ -76,7 +75,7 @@ class NodeLeakTest : public TestShellTest { TEST_F(NodeLeakTest, TestURL) { const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(kTestUrlSwitch)) - NavigateToURL(parsed_command_line.GetSwitchValue(kTestUrlSwitch).c_str()); + NavigateToURL(parsed_command_line.GetSwitchValueASCII(kTestUrlSwitch)); } } // namespace diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index a4c715d..cc2871d 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -204,10 +204,10 @@ int main(int argc, char* argv[]) { #endif if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { - const std::wstring timeout_str = parsed_command_line.GetSwitchValue( + const std::string timeout_str = parsed_command_line.GetSwitchValueASCII( test_shell::kTestShellTimeOut); int timeout_ms; - base::StringToInt(WideToUTF8(timeout_str), &timeout_ms); + base::StringToInt(timeout_str, &timeout_ms); if (timeout_ms > 0) TestShell::SetFileTestTimeout(timeout_ms); } diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index 24cb6be..15596856 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -179,7 +179,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode, const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); if (parsed_command_line.HasSwitch(test_shell::kCrashDumps)) { std::wstring dir( - parsed_command_line.GetSwitchValue(test_shell::kCrashDumps)); + parsed_command_line.GetSwitchValueNative(test_shell::kCrashDumps)); new google_breakpad::ExceptionHandler(dir, 0, &MinidumpCallback, 0, true); } } |