diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 02:14:22 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 02:14:22 +0000 |
commit | d420c31e107cd932582a4a8add0ce2676e4b52da (patch) | |
tree | 0e666287eac5bbd12cc709a932a84d4bb852964b /chrome | |
parent | f6215a232664e488b9c6c66e191c6507d377edcb (diff) | |
download | chromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.zip chromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.tar.gz chromium_src-d420c31e107cd932582a4a8add0ce2676e4b52da.tar.bz2 |
Add an AppendSwitchASCII to CommandLine, and convert a test to it.
I'm removing all the AppendSwitchWithValue() users due to wstrings,
and this is one caller. Since fixing this one caller requires
touching many files, I thought I'd isolate this change from
the other WithValue->ASCII conversions.
Review URL: http://codereview.chromium.org/2878065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/process_watcher_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/common/sandbox_mac_diraccess_unittest.mm | 2 | ||||
-rw-r--r-- | chrome/common/sandbox_mac_unittest_helper.mm | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_main_unittest.cc | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/chrome/common/process_watcher_unittest.cc b/chrome/common/process_watcher_unittest.cc index af4aaa2..159ebb59 100644 --- a/chrome/common/process_watcher_unittest.cc +++ b/chrome/common/process_watcher_unittest.cc @@ -29,7 +29,7 @@ bool IsProcessDead(base::ProcessHandle child) { TEST_F(ProcessWatcherTest, DelayedTermination) { base::ProcessHandle child_process = - SpawnChild(L"process_watcher_test_never_die"); + SpawnChild("process_watcher_test_never_die"); ProcessWatcher::EnsureProcessTerminated(child_process); base::WaitForSingleProcess(child_process, 5000); @@ -47,7 +47,7 @@ MULTIPROCESS_TEST_MAIN(process_watcher_test_never_die) { TEST_F(ProcessWatcherTest, ImmediateTermination) { base::ProcessHandle child_process = - SpawnChild(L"process_watcher_test_die_immediately"); + SpawnChild("process_watcher_test_die_immediately"); // Give it time to die. sleep(2); ProcessWatcher::EnsureProcessTerminated(child_process); diff --git a/chrome/common/sandbox_mac_diraccess_unittest.mm b/chrome/common/sandbox_mac_diraccess_unittest.mm index f356453..1f68a6b 100644 --- a/chrome/common/sandbox_mac_diraccess_unittest.mm +++ b/chrome/common/sandbox_mac_diraccess_unittest.mm @@ -34,7 +34,7 @@ class MacDirAccessSandboxTest : public MultiProcessTest { public: bool CheckSandbox(std::string directory_to_try) { setenv(kSandboxAccessPathKey, directory_to_try.c_str(), 1); - base::ProcessHandle child_process = SpawnChild(L"mac_sandbox_path_access"); + base::ProcessHandle child_process = SpawnChild("mac_sandbox_path_access"); int code = -1; if (!base::WaitForExitCode(child_process, &code)) { LOG(WARNING) << "base::WaitForExitCode failed"; diff --git a/chrome/common/sandbox_mac_unittest_helper.mm b/chrome/common/sandbox_mac_unittest_helper.mm index a14370f..5ad7260 100644 --- a/chrome/common/sandbox_mac_unittest_helper.mm +++ b/chrome/common/sandbox_mac_unittest_helper.mm @@ -71,7 +71,7 @@ bool MacSandboxTest::RunTestInSandbox(sandbox::SandboxProcessType sandbox_type, if (test_data) setenv(kTestDataKey, test_data, 1); - base::ProcessHandle child_process = SpawnChild(L"mac_sandbox_test_runner"); + base::ProcessHandle child_process = SpawnChild("mac_sandbox_test_runner"); int code = -1; if (!base::WaitForExitCode(child_process, &code)) { LOG(WARNING) << "base::WaitForExitCode failed"; diff --git a/chrome/renderer/renderer_main_unittest.cc b/chrome/renderer/renderer_main_unittest.cc index 4b561f8..fcc4f6f 100644 --- a/chrome/renderer/renderer_main_unittest.cc +++ b/chrome/renderer/renderer_main_unittest.cc @@ -30,8 +30,8 @@ class RendererMainTest : public MultiProcessTest { virtual void TearDown(); // Spawns a child process of the specified type - base::ProcessHandle SpawnChild(const std::wstring &procname, - IPC::Channel *channel); + base::ProcessHandle SpawnChild(const std::string& procname, + IPC::Channel* channel); // Created around each test instantiation. MessageLoopForIO *message_loop_; @@ -51,8 +51,8 @@ void RendererMainTest::TearDown() { MultiProcessTest::TearDown(); } -ProcessHandle RendererMainTest::SpawnChild(const std::wstring &procname, - IPC::Channel *channel) { +ProcessHandle RendererMainTest::SpawnChild(const std::string& procname, + IPC::Channel* channel) { base::file_handle_mapping_vector fds_to_map; const int ipcfd = channel->GetClientFileDescriptor(); if (ipcfd > -1) { @@ -90,7 +90,7 @@ TEST_F(RendererMainTest, CreateDestroy) { IPC::Channel control_channel(kRendererTestChannelName, IPC::Channel::MODE_SERVER, &listener); - base::ProcessHandle renderer_pid = SpawnChild(L"SimpleRenderer", + base::ProcessHandle renderer_pid = SpawnChild("SimpleRenderer", &control_channel); control_channel.Connect(); |