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