summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:41:43 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 19:41:43 +0000
commita0607da9446e3ec76a7ced32502f8c7e71654d53 (patch)
tree958a5b77aa00de5981641531e683b565c6d5b3cf /base/process_util_unittest.cc
parent651b77c761749949fc7f148e3c20fe203a61bf7d (diff)
downloadchromium_src-a0607da9446e3ec76a7ced32502f8c7e71654d53.zip
chromium_src-a0607da9446e3ec76a7ced32502f8c7e71654d53.tar.gz
chromium_src-a0607da9446e3ec76a7ced32502f8c7e71654d53.tar.bz2
Revert "POSIX: don't allocate memory after forking."
Appears to break tlslite on the Mac. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index d22a60a..3170b6a 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -294,48 +294,6 @@ TEST_F(ProcessUtilTest, FDRemapping) {
DPCHECK(ret == 0);
}
-static std::string TestLaunchApp(const base::environment_vector& env_changes) {
- std::vector<std::string> args;
- base::file_handle_mapping_vector fds_to_remap;
- ProcessHandle handle;
-
- args.push_back("bash");
- args.push_back("-c");
- args.push_back("echo $BASE_TEST");
-
- int fds[2];
- PCHECK(pipe(fds) == 0);
-
- fds_to_remap.push_back(std::make_pair(fds[1], 1));
- EXPECT_TRUE(LaunchApp(args, env_changes, fds_to_remap,
- true /* wait for exit */, &handle));
- PCHECK(close(fds[1]) == 0);
-
- char buf[32];
- const ssize_t n = HANDLE_EINTR(read(fds[0], buf, sizeof(buf)));
- PCHECK(n > 0);
- return std::string(buf, n);
-}
-
-TEST_F(ProcessUtilTest, LaunchApp) {
- base::environment_vector env_changes;
-
- env_changes.push_back(std::make_pair(std::string("BASE_TEST"),
- std::string("bar")));
- EXPECT_EQ("bar\n", TestLaunchApp(env_changes));
- env_changes.clear();
-
- setenv("BASE_TEST", "testing", 1 /* override */);
- EXPECT_EQ("testing\n", TestLaunchApp(env_changes));
-
- env_changes.push_back(std::make_pair(std::string("BASE_TEST"),
- std::string("")));
- EXPECT_EQ("\n", TestLaunchApp(env_changes));
-
- env_changes[0].second = "foo";
- EXPECT_EQ("foo\n", TestLaunchApp(env_changes));
-}
-
TEST_F(ProcessUtilTest, GetAppOutput) {
std::string output;
EXPECT_TRUE(GetAppOutput(CommandLine(FilePath("true")), &output));