OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "mojo/edk/system/test_utils.h" | 8 #include "mojo/edk/system/test_utils.h" |
9 #include "mojo/edk/test/mojo_test_base.h" | 9 #include "mojo/edk/test/mojo_test_base.h" |
10 #include "mojo/public/c/system/core.h" | 10 #include "mojo/public/c/system/core.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 RUN_CHILD_ON_PIPE(DataPipeHandlePingPong, h) | 445 RUN_CHILD_ON_PIPE(DataPipeHandlePingPong, h) |
446 for (size_t i = 0; i < kPingPongIterations; i++) { | 446 for (size_t i = 0; i < kPingPongIterations; i++) { |
447 WriteMessageWithHandles(h, "", &p, 1); | 447 WriteMessageWithHandles(h, "", &p, 1); |
448 ReadMessageWithHandles(h, &p, 1); | 448 ReadMessageWithHandles(h, &p, 1); |
449 } | 449 } |
450 END_CHILD() | 450 END_CHILD() |
451 MojoClose(p); | 451 MojoClose(p); |
452 } | 452 } |
453 | 453 |
454 TEST_F(MessagePipeTest, SharedBufferHandlePingPong) { | 454 TEST_F(MessagePipeTest, DISABLED_SharedBufferHandlePingPong) { |
455 MojoHandle buffer; | 455 MojoHandle buffer; |
456 EXPECT_EQ(MOJO_RESULT_OK, MojoCreateSharedBuffer(nullptr, 1, &buffer)); | 456 EXPECT_EQ(MOJO_RESULT_OK, MojoCreateSharedBuffer(nullptr, 1, &buffer)); |
457 | 457 |
458 RUN_CHILD_ON_PIPE(DataPipeHandlePingPong, h) | 458 RUN_CHILD_ON_PIPE(DataPipeHandlePingPong, h) |
459 for (size_t i = 0; i < kPingPongIterations; i++) { | 459 for (size_t i = 0; i < kPingPongIterations; i++) { |
460 WriteMessageWithHandles(h, "", &buffer, 1); | 460 WriteMessageWithHandles(h, "", &buffer, 1); |
461 ReadMessageWithHandles(h, &buffer, 1); | 461 ReadMessageWithHandles(h, &buffer, 1); |
462 } | 462 } |
463 END_CHILD() | 463 END_CHILD() |
464 MojoClose(buffer); | 464 MojoClose(buffer); |
465 } | 465 } |
466 | 466 |
467 #endif // !defined(OS_IOS) | 467 #endif // !defined(OS_IOS) |
468 | 468 |
469 } // namespace | 469 } // namespace |
470 } // namespace edk | 470 } // namespace edk |
471 } // namespace mojo | 471 } // namespace mojo |
OLD | NEW |