| 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_POSIX) | 7 #if defined(OS_POSIX) |
| 8 #if defined(OS_MACOSX) | 8 #if defined(OS_MACOSX) |
| 9 extern "C" { | 9 extern "C" { |
| 10 #include <sandbox.h> | 10 #include <sandbox.h> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 base::MessageLoop::current()->Run(); | 130 base::MessageLoop::current()->Run(); |
| 131 | 131 |
| 132 // Close the channel so the client's OnChannelError() gets fired. | 132 // Close the channel so the client's OnChannelError() gets fired. |
| 133 channel()->Close(); | 133 channel()->Close(); |
| 134 | 134 |
| 135 EXPECT_TRUE(WaitForClientShutdown()); | 135 EXPECT_TRUE(WaitForClientShutdown()); |
| 136 DestroyChannel(); | 136 DestroyChannel(); |
| 137 } | 137 } |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 TEST_F(IPCSendFdsTest, DescriptorTest) { | 140 #if defined(OS_ANDROID) |
| 141 #define MAYBE_DescriptorTest DISABLED_DescriptorTest |
| 142 #else |
| 143 #define MAYBE_DescriptorTest DescriptorTest |
| 144 #endif |
| 145 TEST_F(IPCSendFdsTest, MAYBE_DescriptorTest) { |
| 141 Init("SendFdsClient"); | 146 Init("SendFdsClient"); |
| 142 RunServer(); | 147 RunServer(); |
| 143 } | 148 } |
| 144 | 149 |
| 145 int SendFdsClientCommon(const std::string& test_client_name, | 150 int SendFdsClientCommon(const std::string& test_client_name, |
| 146 ino_t expected_inode_num) { | 151 ino_t expected_inode_num) { |
| 147 base::MessageLoopForIO main_message_loop; | 152 base::MessageLoopForIO main_message_loop; |
| 148 MyChannelDescriptorListener listener(expected_inode_num); | 153 MyChannelDescriptorListener listener(expected_inode_num); |
| 149 | 154 |
| 150 // Set up IPC channel. | 155 // Set up IPC channel. |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 base::WaitableEvent received_; | 377 base::WaitableEvent received_; |
| 373 }; | 378 }; |
| 374 | 379 |
| 375 TEST_F(IPCMultiSendingFdsTest, StressTest) { | 380 TEST_F(IPCMultiSendingFdsTest, StressTest) { |
| 376 Run(); | 381 Run(); |
| 377 } | 382 } |
| 378 | 383 |
| 379 } // namespace | 384 } // namespace |
| 380 | 385 |
| 381 #endif // defined(OS_POSIX) | 386 #endif // defined(OS_POSIX) |
| OLD | NEW |