| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 base::MessageLoop::current()->Run(); | 136 base::MessageLoop::current()->Run(); |
| 137 | 137 |
| 138 // Close the channel so the client's OnChannelError() gets fired. | 138 // Close the channel so the client's OnChannelError() gets fired. |
| 139 channel()->Close(); | 139 channel()->Close(); |
| 140 | 140 |
| 141 EXPECT_TRUE(WaitForClientShutdown()); | 141 EXPECT_TRUE(WaitForClientShutdown()); |
| 142 DestroyChannel(); | 142 DestroyChannel(); |
| 143 } | 143 } |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 #if defined(OS_ANDROID) | 146 TEST_F(IPCSendFdsTest, DescriptorTest) { |
| 147 #define MAYBE_DescriptorTest DISABLED_DescriptorTest | |
| 148 #else | |
| 149 #define MAYBE_DescriptorTest DescriptorTest | |
| 150 #endif | |
| 151 TEST_F(IPCSendFdsTest, MAYBE_DescriptorTest) { | |
| 152 Init("SendFdsClient"); | 147 Init("SendFdsClient"); |
| 153 RunServer(); | 148 RunServer(); |
| 154 } | 149 } |
| 155 | 150 |
| 156 int SendFdsClientCommon(const std::string& test_client_name, | 151 int SendFdsClientCommon(const std::string& test_client_name, |
| 157 ino_t expected_inode_num) { | 152 ino_t expected_inode_num) { |
| 158 base::MessageLoopForIO main_message_loop; | 153 base::MessageLoopForIO main_message_loop; |
| 159 MyChannelDescriptorListener listener(expected_inode_num); | 154 MyChannelDescriptorListener listener(expected_inode_num); |
| 160 | 155 |
| 161 // Set up IPC channel. | 156 // Set up IPC channel. |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 base::WaitableEvent received_; | 378 base::WaitableEvent received_; |
| 384 }; | 379 }; |
| 385 | 380 |
| 386 TEST_F(IPCMultiSendingFdsTest, StressTest) { | 381 TEST_F(IPCMultiSendingFdsTest, StressTest) { |
| 387 Run(); | 382 Run(); |
| 388 } | 383 } |
| 389 | 384 |
| 390 } // namespace | 385 } // namespace |
| 391 | 386 |
| 392 #endif // defined(OS_POSIX) | 387 #endif // defined(OS_POSIX) |
| OLD | NEW |