| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/eintr_wrapper.h" | 8 #include "base/eintr_wrapper.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/multiprocess_test.h" | 10 #include "base/multiprocess_test.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 EXPECT_FALSE(GetAppOutput(CommandLine(L"false"), &output)); | 263 EXPECT_FALSE(GetAppOutput(CommandLine(L"false"), &output)); |
| 264 | 264 |
| 265 std::vector<std::string> argv; | 265 std::vector<std::string> argv; |
| 266 argv.push_back("/bin/echo"); | 266 argv.push_back("/bin/echo"); |
| 267 argv.push_back("-n"); | 267 argv.push_back("-n"); |
| 268 argv.push_back("foobar42"); | 268 argv.push_back("foobar42"); |
| 269 EXPECT_TRUE(GetAppOutput(CommandLine(argv), &output)); | 269 EXPECT_TRUE(GetAppOutput(CommandLine(argv), &output)); |
| 270 EXPECT_STREQ("foobar42", output.c_str()); | 270 EXPECT_STREQ("foobar42", output.c_str()); |
| 271 } | 271 } |
| 272 | 272 |
| 273 #if defined(OS_LINUX) |
| 274 TEST_F(ProcessUtilTest, GetParentProcessId) { |
| 275 base::ProcessId ppid = GetParentProcessId(GetCurrentProcId()); |
| 276 EXPECT_EQ(ppid, getppid()); |
| 277 } |
| 278 #endif |
| 279 |
| 273 #endif // defined(OS_POSIX) | 280 #endif // defined(OS_POSIX) |
| 274 | 281 |
| 275 } // namespace base | 282 } // namespace base |
| OLD | NEW |