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 /base/process_util_unittest.cc | |
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 'base/process_util_unittest.cc')
-rw-r--r-- | base/process_util_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 481c759..92031c9 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -74,7 +74,7 @@ MULTIPROCESS_TEST_MAIN(SimpleChildProcess) { } TEST_F(ProcessUtilTest, SpawnChild) { - base::ProcessHandle handle = this->SpawnChild(L"SimpleChildProcess"); + base::ProcessHandle handle = this->SpawnChild("SimpleChildProcess"); ASSERT_NE(base::kNullProcessHandle, handle); EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000)); base::CloseProcessHandle(handle); @@ -87,7 +87,7 @@ MULTIPROCESS_TEST_MAIN(SlowChildProcess) { TEST_F(ProcessUtilTest, KillSlowChild) { remove("SlowChildProcess.die"); - base::ProcessHandle handle = this->SpawnChild(L"SlowChildProcess"); + base::ProcessHandle handle = this->SpawnChild("SlowChildProcess"); ASSERT_NE(base::kNullProcessHandle, handle); SignalChildren("SlowChildProcess.die"); EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000)); @@ -97,7 +97,7 @@ TEST_F(ProcessUtilTest, KillSlowChild) { TEST_F(ProcessUtilTest, DidProcessCrash) { remove("SlowChildProcess.die"); - base::ProcessHandle handle = this->SpawnChild(L"SlowChildProcess"); + base::ProcessHandle handle = this->SpawnChild("SlowChildProcess"); ASSERT_NE(base::kNullProcessHandle, handle); bool child_exited = true; @@ -117,7 +117,7 @@ TEST_F(ProcessUtilTest, DidProcessCrash) { // Note: a platform may not be willing or able to lower the priority of // a process. The calls to SetProcessBackground should be noops then. TEST_F(ProcessUtilTest, SetProcessBackgrounded) { - base::ProcessHandle handle = this->SpawnChild(L"SimpleChildProcess"); + base::ProcessHandle handle = this->SpawnChild("SimpleChildProcess"); base::Process process(handle); int old_priority = process.GetPriority(); process.SetProcessBackgrounded(true); @@ -225,7 +225,7 @@ TEST_F(ProcessUtilTest, LaunchAsUser) { base::UserTokenHandle token; ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token)); std::wstring cmdline = - this->MakeCmdLine(L"SimpleChildProcess", false).command_line_string(); + this->MakeCmdLine("SimpleChildProcess", false).command_line_string(); EXPECT_TRUE(base::LaunchAppAsUser(token, cmdline, false, NULL)); } @@ -290,7 +290,7 @@ int ProcessUtilTest::CountOpenFDsInChild() { base::file_handle_mapping_vector fd_mapping_vec; fd_mapping_vec.push_back(std::pair<int, int>(fds[1], kChildPipe)); base::ProcessHandle handle = this->SpawnChild( - L"ProcessUtilsLeakFDChildProcess", fd_mapping_vec, false); + "ProcessUtilsLeakFDChildProcess", fd_mapping_vec, false); CHECK(handle); int ret = HANDLE_EINTR(close(fds[1])); DPCHECK(ret == 0); |