| 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" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/platform_thread.h" | 12 #include "base/platform_thread.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 #if defined(OS_LINUX) | 16 #if defined(OS_LINUX) |
| 17 #include <dlfcn.h> | 17 #include <dlfcn.h> |
| 18 #endif | 18 #endif |
| 19 #if defined(OS_POSIX) | 19 #if defined(OS_POSIX) |
| 20 #include <fcntl.h> | 20 #include <fcntl.h> |
| 21 #include <sys/resource.h> |
| 21 #include <sys/socket.h> | 22 #include <sys/socket.h> |
| 22 #endif | 23 #endif |
| 23 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
| 24 #include <windows.h> | 25 #include <windows.h> |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 | 29 |
| 29 class ProcessUtilTest : public MultiProcessTest { | 30 class ProcessUtilTest : public MultiProcessTest { |
| 30 }; | 31 }; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 #if defined(OS_LINUX) | 274 #if defined(OS_LINUX) |
| 274 TEST_F(ProcessUtilTest, GetParentProcessId) { | 275 TEST_F(ProcessUtilTest, GetParentProcessId) { |
| 275 base::ProcessId ppid = GetParentProcessId(GetCurrentProcId()); | 276 base::ProcessId ppid = GetParentProcessId(GetCurrentProcId()); |
| 276 EXPECT_EQ(ppid, getppid()); | 277 EXPECT_EQ(ppid, getppid()); |
| 277 } | 278 } |
| 278 #endif | 279 #endif |
| 279 | 280 |
| 280 #endif // defined(OS_POSIX) | 281 #endif // defined(OS_POSIX) |
| 281 | 282 |
| 282 } // namespace base | 283 } // namespace base |
| OLD | NEW |