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 <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 std::string message = ReadMessageWithHandles(parent, &pipe, 1); | 209 std::string message = ReadMessageWithHandles(parent, &pipe, 1); |
210 WriteMessageWithHandles(child, message, &pipe, 1); | 210 WriteMessageWithHandles(child, message, &pipe, 1); |
211 | 211 |
212 EXPECT_EQ("quit", ReadMessage(parent)); | 212 EXPECT_EQ("quit", ReadMessage(parent)); |
213 WriteMessage(child, "quit"); | 213 WriteMessage(child, "quit"); |
214 EXPECT_EQ("ok", ReadMessage(child)); | 214 EXPECT_EQ("ok", ReadMessage(child)); |
215 WriteMessage(parent, "ok"); | 215 WriteMessage(parent, "ok"); |
216 END_CHILD() | 216 END_CHILD() |
217 } | 217 } |
218 | 218 |
219 #if defined(OS_ANDROID) | 219 #if defined(OS_ANDROID) || defined(OS_MACOSX) |
220 // Android multi-process tests are not executing the new process. This is flaky. | 220 // Android multi-process tests are not executing the new process. This is flaky. |
| 221 // Passing shared memory handles between cousins is not currently supported on |
| 222 // OSX. |
221 #define MAYBE_PassHandleBetweenCousins DISABLED_PassHandleBetweenCousins | 223 #define MAYBE_PassHandleBetweenCousins DISABLED_PassHandleBetweenCousins |
222 #else | 224 #else |
223 #define MAYBE_PassHandleBetweenCousins PassHandleBetweenCousins | 225 #define MAYBE_PassHandleBetweenCousins PassHandleBetweenCousins |
224 #endif | 226 #endif |
225 TEST_F(SharedBufferTest, MAYBE_PassHandleBetweenCousins) { | 227 TEST_F(SharedBufferTest, MAYBE_PassHandleBetweenCousins) { |
226 const std::string message = "hello"; | 228 const std::string message = "hello"; |
227 MojoHandle p0, p1; | 229 MojoHandle p0, p1; |
228 CreateMessagePipe(&p0, &p1); | 230 CreateMessagePipe(&p0, &p1); |
229 | 231 |
230 // Spawn two children who will each spawn their own child. Make sure the | 232 // Spawn two children who will each spawn their own child. Make sure the |
(...skipping 19 matching lines...) Expand all Loading... |
250 | 252 |
251 // The second grandchild should have written this message. | 253 // The second grandchild should have written this message. |
252 ExpectBufferContents(b, 0, message); | 254 ExpectBufferContents(b, 0, message); |
253 } | 255 } |
254 | 256 |
255 #endif // !defined(OS_IOS) | 257 #endif // !defined(OS_IOS) |
256 | 258 |
257 } // namespace | 259 } // namespace |
258 } // namespace edk | 260 } // namespace edk |
259 } // namespace mojo | 261 } // namespace mojo |
OLD | NEW |