| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <mach/mach_vm.h> | 8 #include <mach/mach_vm.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 return CommonPrivilegedProcessMain( | 813 return CommonPrivilegedProcessMain( |
| 814 &SendOneMessageWithTwoSameSharedMemoryHandlesCallback, | 814 &SendOneMessageWithTwoSameSharedMemoryHandlesCallback, |
| 815 "SendOneMessageWithTwoSameSharedMemoryHandles"); | 815 "SendOneMessageWithTwoSameSharedMemoryHandles"); |
| 816 } | 816 } |
| 817 | 817 |
| 818 // Sends one message with two Posix FDs and two Mach ports. | 818 // Sends one message with two Posix FDs and two Mach ports. |
| 819 TEST_F(IPCAttachmentBrokerMacTest, SendPosixFDAndMachPort) { | 819 TEST_F(IPCAttachmentBrokerMacTest, SendPosixFDAndMachPort) { |
| 820 base::ScopedTempDir temp_dir; | 820 base::ScopedTempDir temp_dir; |
| 821 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 821 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
| 822 base::FilePath fp1, fp2; | 822 base::FilePath fp1, fp2; |
| 823 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(), &fp1)); | 823 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.GetPath(), &fp1)); |
| 824 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(), &fp2)); | 824 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.GetPath(), &fp2)); |
| 825 | 825 |
| 826 CommonSetUp("SendPosixFDAndMachPort"); | 826 CommonSetUp("SendPosixFDAndMachPort"); |
| 827 | 827 |
| 828 { | 828 { |
| 829 std::unique_ptr<base::SharedMemory> shared_memory1( | 829 std::unique_ptr<base::SharedMemory> shared_memory1( |
| 830 MakeSharedMemory(kDataBuffer1)); | 830 MakeSharedMemory(kDataBuffer1)); |
| 831 std::unique_ptr<base::SharedMemory> shared_memory2( | 831 std::unique_ptr<base::SharedMemory> shared_memory2( |
| 832 MakeSharedMemory(kDataBuffer2)); | 832 MakeSharedMemory(kDataBuffer2)); |
| 833 | 833 |
| 834 base::FileDescriptor file_descriptor1( | 834 base::FileDescriptor file_descriptor1( |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 SendControlMessage(sender, success); | 1290 SendControlMessage(sender, success); |
| 1291 } | 1291 } |
| 1292 } | 1292 } |
| 1293 | 1293 |
| 1294 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(MemoryUsageManyMessages) { | 1294 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(MemoryUsageManyMessages) { |
| 1295 return CommonPrivilegedProcessMain(&MemoryUsageManyMessagesCallback, | 1295 return CommonPrivilegedProcessMain(&MemoryUsageManyMessagesCallback, |
| 1296 "MemoryUsageManyMessages"); | 1296 "MemoryUsageManyMessages"); |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 } // namespace | 1299 } // namespace |
| OLD | NEW |