| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
| 8 extern "C" { | 8 extern "C" { |
| 9 #include <sandbox.h> | 9 #include <sandbox.h> |
| 10 } | 10 } |
| 11 #endif | 11 #endif |
| 12 #include <fcntl.h> | 12 #include <fcntl.h> |
| 13 #include <sys/stat.h> | 13 #include <sys/stat.h> |
| 14 | 14 |
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/posix/eintr_wrapper.h" | 16 #include "base/posix/eintr_wrapper.h" |
| 17 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
| 18 #include "ipc/ipc_listener.h" | 18 #include "ipc/ipc_listener.h" |
| 19 #include "ipc/ipc_message_utils.h" | 19 #include "ipc/ipc_message_utils.h" |
| 20 #include "ipc/ipc_multiprocess_test.h" | 20 #include "ipc/ipc_multiprocess_test.h" |
| 21 #include "ipc/ipc_test_base.h" | 21 #include "ipc/ipc_test_base.h" |
| 22 #include "testing/multiprocess_func_list.h" | |
| 23 | 22 |
| 24 #if defined(OS_POSIX) | 23 #if defined(OS_POSIX) |
| 25 #include "base/file_descriptor_posix.h" | 24 #include "base/file_descriptor_posix.h" |
| 26 | 25 |
| 27 namespace { | 26 namespace { |
| 28 | 27 |
| 29 const unsigned kNumFDsToSend = 20; | 28 const unsigned kNumFDsToSend = 20; |
| 30 const char* kDevZeroPath = "/dev/zero"; | 29 const char* kDevZeroPath = "/dev/zero"; |
| 31 | 30 |
| 32 static void VerifyAndCloseDescriptor(int fd, ino_t inode_num) { | 31 static void VerifyAndCloseDescriptor(int fd, ino_t inode_num) { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 ASSERT_TRUE(chan.Connect()); | 196 ASSERT_TRUE(chan.Connect()); |
| 198 | 197 |
| 199 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT, | 198 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT, |
| 200 &chan); | 199 &chan); |
| 201 TestDescriptorServer(chan, process_handle); | 200 TestDescriptorServer(chan, process_handle); |
| 202 } | 201 } |
| 203 | 202 |
| 204 } // namespace | 203 } // namespace |
| 205 | 204 |
| 206 #endif // defined(OS_POSIX) | 205 #endif // defined(OS_POSIX) |
| OLD | NEW |