diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 05:59:57 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 05:59:57 +0000 |
commit | 05076ba206e040b31fdb41a39cc10a2ecc4adf9d (patch) | |
tree | 58c20da4c63a0384c2241b5ddd676a6b7bddf927 /chrome/test | |
parent | 4c4aae74e9f32f7ff06226b3d5e2fd1723127913 (diff) | |
download | chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.zip chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.gz chromium_src-05076ba206e040b31fdb41a39cc10a2ecc4adf9d.tar.bz2 |
Convert a bunch of easy AppendSwitchWithValue to *ASCII.
For this patch, I skipped over any instance where it wasn't a nearly trivial
change.
Review URL: http://codereview.chromium.org/3069014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 3 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/live_sync/live_sync_test.cc | 8 | ||||
-rw-r--r-- | chrome/test/nacl/nacl_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/page_cycler/page_cycler_test.cc | 4 | ||||
-rw-r--r-- | chrome/test/plugin/plugin_test.cpp | 4 | ||||
-rw-r--r-- | chrome/test/tab_switching/tab_switching_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/test_launcher/out_of_proc_test_runner.cc | 4 | ||||
-rw-r--r-- | chrome/test/ui/pepper_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/test/ui/sandbox_uitests.cc | 4 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 10 | ||||
-rw-r--r-- | chrome/test/ui_test_utils.cc | 4 |
12 files changed, 24 insertions, 25 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index a16ac12..d9cf8f2 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -44,8 +44,7 @@ class AutomationProxyTest : public UITest { protected: AutomationProxyTest() { dom_automation_enabled_ = true; - launch_arguments_.AppendSwitchWithValue(switches::kLang, - "en-US"); + launch_arguments_.AppendSwitchASCII(switches::kLang, "en-US"); } }; diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index b8b8d90..4d2fb9b 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -142,7 +142,7 @@ void InProcessBrowserTest::SetUp() { command_line->AppendSwitch(switches::kNoFirstRun); // This is a Browser test. - command_line->AppendSwitchWithValue(switches::kTestType, kBrowserTestType); + command_line->AppendSwitchASCII(switches::kTestType, kBrowserTestType); // Single-process mode is not set in BrowserMain so it needs to be processed // explicitly. diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc index 207eb99..8f87da3 100644 --- a/chrome/test/live_sync/live_sync_test.cc +++ b/chrome/test/live_sync/live_sync_test.cc @@ -60,8 +60,8 @@ void LiveSyncTest::SetUp() { // TODO(rsimha): Until we implement a fake Tango server against which tests // can run, we need to set the --sync-notification-method to "transitional". if (!cl->HasSwitch(switches::kSyncNotificationMethod)) { - cl->AppendSwitchWithValue(switches::kSyncNotificationMethod, - "transitional"); + cl->AppendSwitchASCII(switches::kSyncNotificationMethod, + "transitional"); } // Unless a sync server was explicitly provided, run a test one locally. @@ -183,9 +183,9 @@ void LiveSyncTest::SetUpLocalTestServer() { started_local_test_server_ = true; CommandLine* cl = CommandLine::ForCurrentProcess(); - cl->AppendSwitchWithValue(switches::kSyncServiceURL, + cl->AppendSwitchASCII(switches::kSyncServiceURL, StringPrintf("http://%s:%d/chromiumsync", server_.kHostName, - server_.kOKHTTPSPort)); + server_.kOKHTTPSPort)); } void LiveSyncTest::TearDownLocalTestServer() { diff --git a/chrome/test/nacl/nacl_test.cc b/chrome/test/nacl/nacl_test.cc index 5a249c3..a2c0afb 100644 --- a/chrome/test/nacl/nacl_test.cc +++ b/chrome/test/nacl/nacl_test.cc @@ -33,7 +33,7 @@ NaClTest::NaClTest() #if defined(OS_LINUX) && defined(USE_SECCOMP_SANDBOX) launch_arguments_.AppendSwitch(switches::kDisableSeccompSandbox); #endif - launch_arguments_.AppendSwitchWithValue(switches::kLoggingLevel, "0"); + launch_arguments_.AppendSwitchASCII(switches::kLoggingLevel, "0"); } NaClTest::~NaClTest() {} diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc index 1b4fa0e..276c446 100644 --- a/chrome/test/page_cycler/page_cycler_test.cc +++ b/chrome/test/page_cycler/page_cycler_test.cc @@ -162,8 +162,8 @@ class PageCyclerTest : public UITest { // Expose garbage collection for the page cycler tests. - launch_arguments_.AppendSwitchWithValue(switches::kJavaScriptFlags, - "--expose_gc"); + launch_arguments_.AppendSwitchASCII(switches::kJavaScriptFlags, + "--expose_gc"); #if defined(OS_MACOSX) static rlim_t initial_fd_limit = GetFileDescriptorLimit(); fd_limit_ = initial_fd_limit; diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp index 80643b7..e047121 100644 --- a/chrome/test/plugin/plugin_test.cpp +++ b/chrome/test/plugin/plugin_test.cpp @@ -64,8 +64,8 @@ class PluginTest : public UITest { // the new plugin. launch_arguments_.AppendSwitch(kUseOldWMPPluginSwitch); } else if (strcmp(test_info->name(), "FlashSecurity") == 0) { - launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox, - "security_tests.dll"); + launch_arguments_.AppendSwitchASCII(switches::kTestSandbox, + "security_tests.dll"); } UITest::SetUp(); diff --git a/chrome/test/tab_switching/tab_switching_test.cc b/chrome/test/tab_switching/tab_switching_test.cc index 72677d8..20386c8 100644 --- a/chrome/test/tab_switching/tab_switching_test.cc +++ b/chrome/test/tab_switching/tab_switching_test.cc @@ -174,7 +174,7 @@ class TabSwitchingUITest : public UITest { void AddLaunchArguments() { launch_arguments_.AppendSwitch(switches::kEnableLogging); launch_arguments_.AppendSwitch(switches::kDumpHistogramsOnExit); - launch_arguments_.AppendSwitchWithValue(switches::kLoggingLevel, "0"); + launch_arguments_.AppendSwitchASCII(switches::kLoggingLevel, "0"); } DISALLOW_COPY_AND_ASSIGN(TabSwitchingUITest); diff --git a/chrome/test/test_launcher/out_of_proc_test_runner.cc b/chrome/test/test_launcher/out_of_proc_test_runner.cc index 28fd5dd9..8f675b8 100644 --- a/chrome/test/test_launcher/out_of_proc_test_runner.cc +++ b/chrome/test/test_launcher/out_of_proc_test_runner.cc @@ -66,13 +66,13 @@ class OutOfProcTestRunner : public tests::TestRunner { switches.erase(kGTestOutputFlag); for (CommandLine::SwitchMap::const_iterator iter = switches.begin(); iter != switches.end(); ++iter) { - new_cmd_line.AppendSwitchWithValue((*iter).first, (*iter).second); + new_cmd_line.AppendSwitchNative((*iter).first, (*iter).second); } // Always enable disabled tests. This method is not called with disabled // tests unless this flag was specified to the browser test executable. new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); - new_cmd_line.AppendSwitchWithValue("gtest_filter", test_name); + new_cmd_line.AppendSwitchASCII("gtest_filter", test_name); new_cmd_line.AppendSwitch(kChildProcessFlag); // Do not let the child ignore failures. We need to propagate the diff --git a/chrome/test/ui/pepper_uitest.cc b/chrome/test/ui/pepper_uitest.cc index 37654ee..8a8c0025 100644 --- a/chrome/test/ui/pepper_uitest.cc +++ b/chrome/test/ui/pepper_uitest.cc @@ -32,7 +32,7 @@ class PepperTester : public NPAPITesterBase { launch_arguments_.AppendSwitch(switches::kEnableGPUPlugin); // Use Mesa software renderer so it can run on testbots without any // graphics hardware. - launch_arguments_.AppendSwitchWithValue(switches::kUseGL, "osmesa"); + launch_arguments_.AppendSwitchASCII(switches::kUseGL, "osmesa"); NPAPITesterBase::SetUp(); } }; diff --git a/chrome/test/ui/sandbox_uitests.cc b/chrome/test/ui/sandbox_uitests.cc index 172028b..e65abfc 100644 --- a/chrome/test/ui/sandbox_uitests.cc +++ b/chrome/test/ui/sandbox_uitests.cc @@ -13,8 +13,8 @@ class SandboxTest : public UITest { protected: // Launches chrome with the --test-sandbox=security_tests.dll flag. SandboxTest() : UITest() { - launch_arguments_.AppendSwitchWithValue(switches::kTestSandbox, - "security_tests.dll"); + launch_arguments_.AppendSwitchASCII(switches::kTestSandbox, + "security_tests.dll"); } }; diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index f3eff50..d088661 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -334,7 +334,7 @@ void UITestBase::StartHttpServerWithPort(const FilePath& root_directory, const std::wstring& port) { scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine()); ASSERT_TRUE(cmd_line.get()); - cmd_line->AppendSwitchWithValue("server", "start"); + cmd_line->AppendSwitchASCII("server", "start"); cmd_line->AppendSwitch("register_cygwin"); cmd_line->AppendSwitchPath("root", root_directory); @@ -355,7 +355,7 @@ void UITestBase::StartHttpServerWithPort(const FilePath& root_directory, void UITestBase::StopHttpServer() { scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine()); ASSERT_TRUE(cmd_line.get()); - cmd_line->AppendSwitchWithValue("server", "stop"); + cmd_line->AppendSwitchASCII("server", "stop"); RunCommand(*cmd_line.get()); } @@ -1118,7 +1118,7 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments, command_line.AppendSwitch(switches::kNoDefaultBrowserCheck); // This is a UI test. - command_line.AppendSwitchWithValue(switches::kTestType, kUITestType); + command_line.AppendSwitchASCII(switches::kTestType, kUITestType); // Tell the browser to use a temporary directory just for this test. command_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir()); @@ -1131,8 +1131,8 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments, command_line.AppendSwitch(switches::kDomAutomationController); if (include_testing_id_) { - command_line.AppendSwitchWithValue(switches::kTestingChannelID, - server_->channel_id()); + command_line.AppendSwitchASCII(switches::kTestingChannelID, + server_->channel_id()); } if (!show_error_dialogs_ && diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index a1abccd..a6dde7c 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -615,7 +615,7 @@ void AppendToPythonPath(const FilePath& dir) { TestWebSocketServer::TestWebSocketServer(const FilePath& root_directory) { scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); - cmd_line->AppendSwitchWithValue("server", "start"); + cmd_line->AppendSwitchASCII("server", "start"); cmd_line->AppendSwitch("chromium"); cmd_line->AppendSwitch("register_cygwin"); cmd_line->AppendSwitchPath("root", root_directory); @@ -661,7 +661,7 @@ CommandLine* TestWebSocketServer::CreateWebSocketServerCommandLine() { TestWebSocketServer::~TestWebSocketServer() { scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); - cmd_line->AppendSwitchWithValue("server", "stop"); + cmd_line->AppendSwitchASCII("server", "stop"); cmd_line->AppendSwitch("chromium"); cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); base::LaunchApp(*cmd_line.get(), true, false, NULL); |