| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 868 |
| 869 WriteMessage(h, "exit"); | 869 WriteMessage(h, "exit"); |
| 870 END_CHILD() | 870 END_CHILD() |
| 871 | 871 |
| 872 CloseHandle(echo_factory_proxy); | 872 CloseHandle(echo_factory_proxy); |
| 873 CloseHandle(echo_proxy_a); | 873 CloseHandle(echo_proxy_a); |
| 874 CloseHandle(echo_proxy_b); | 874 CloseHandle(echo_proxy_b); |
| 875 CloseHandle(echo_proxy_c); | 875 CloseHandle(echo_proxy_c); |
| 876 } | 876 } |
| 877 | 877 |
| 878 #if !defined(OS_ANDROID) |
| 879 // This test is suspected to be flaky on android https://crbug.com/663998 |
| 880 // and thus disabled on android. |
| 878 TEST_P(MultiprocessMessagePipeTestWithPeerSupport, | 881 TEST_P(MultiprocessMessagePipeTestWithPeerSupport, |
| 879 ChannelPipesWithMultipleChildren) { | 882 ChannelPipesWithMultipleChildren) { |
| 880 RUN_CHILD_ON_PIPE(ChannelEchoClient, a) | 883 RUN_CHILD_ON_PIPE(ChannelEchoClient, a) |
| 881 RUN_CHILD_ON_PIPE(ChannelEchoClient, b) | 884 RUN_CHILD_ON_PIPE(ChannelEchoClient, b) |
| 882 VerifyEcho(a, "hello child 0"); | 885 VerifyEcho(a, "hello child 0"); |
| 883 VerifyEcho(b, "hello child 1"); | 886 VerifyEcho(b, "hello child 1"); |
| 884 | 887 |
| 885 WriteMessage(a, "exit"); | 888 WriteMessage(a, "exit"); |
| 886 WriteMessage(b, "exit"); | 889 WriteMessage(b, "exit"); |
| 887 END_CHILD() | 890 END_CHILD() |
| 888 END_CHILD() | 891 END_CHILD() |
| 889 } | 892 } |
| 893 #endif |
| 890 | 894 |
| 891 // Reads and turns a pipe handle some number of times to create lots of | 895 // Reads and turns a pipe handle some number of times to create lots of |
| 892 // transient proxies. | 896 // transient proxies. |
| 893 DEFINE_TEST_CLIENT_TEST_WITH_PIPE(PingPongPipeClient, | 897 DEFINE_TEST_CLIENT_TEST_WITH_PIPE(PingPongPipeClient, |
| 894 MultiprocessMessagePipeTest, h) { | 898 MultiprocessMessagePipeTest, h) { |
| 895 const size_t kNumBounces = 50; | 899 const size_t kNumBounces = 50; |
| 896 MojoHandle p0, p1; | 900 MojoHandle p0, p1; |
| 897 ReadMessageWithHandles(h, &p0, 1); | 901 ReadMessageWithHandles(h, &p0, 1); |
| 898 ReadMessageWithHandles(h, &p1, 1); | 902 ReadMessageWithHandles(h, &p1, 1); |
| 899 for (size_t i = 0; i < kNumBounces; ++i) { | 903 for (size_t i = 0; i < kNumBounces; ++i) { |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 INSTANTIATE_TEST_CASE_P( | 1426 INSTANTIATE_TEST_CASE_P( |
| 1423 , | 1427 , |
| 1424 MultiprocessMessagePipeTestWithPeerSupport, | 1428 MultiprocessMessagePipeTestWithPeerSupport, |
| 1425 testing::Values(test::MojoTestBase::LaunchType::CHILD, | 1429 testing::Values(test::MojoTestBase::LaunchType::CHILD, |
| 1426 test::MojoTestBase::LaunchType::PEER, | 1430 test::MojoTestBase::LaunchType::PEER, |
| 1427 test::MojoTestBase::LaunchType::NAMED_CHILD, | 1431 test::MojoTestBase::LaunchType::NAMED_CHILD, |
| 1428 test::MojoTestBase::LaunchType::NAMED_PEER)); | 1432 test::MojoTestBase::LaunchType::NAMED_PEER)); |
| 1429 } // namespace | 1433 } // namespace |
| 1430 } // namespace edk | 1434 } // namespace edk |
| 1431 } // namespace mojo | 1435 } // namespace mojo |
| OLD | NEW |