| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/edk/embedder/embedder.h" | 5 #include "mojo/edk/embedder/embedder.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 // Close the remote end, simulating child death before the child connects to | 217 // Close the remote end, simulating child death before the child connects to |
| 218 // the reserved port. | 218 // the reserved port. |
| 219 ignore_result(pair.PassClientHandle()); | 219 ignore_result(pair.PassClientHandle()); |
| 220 | 220 |
| 221 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(parent_mp.get().value(), | 221 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(parent_mp.get().value(), |
| 222 MOJO_HANDLE_SIGNAL_PEER_CLOSED, | 222 MOJO_HANDLE_SIGNAL_PEER_CLOSED, |
| 223 MOJO_DEADLINE_INDEFINITE, | 223 MOJO_DEADLINE_INDEFINITE, |
| 224 nullptr)); | 224 nullptr)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 TEST_F(EmbedderTest, PipeSetup_LaunchFailure) { | 227 #if defined(OS_ANDROID) |
| 228 // This test is suspected to be flaky on android https://crbug.com/663998. |
| 229 #define MAYBE_PipeSetup_LaunchFailure \ |
| 230 DISABLED_PipeSetup_LaunchFailure |
| 231 #else |
| 232 #define MAYBE_PipeSetup_LaunchFailure \ |
| 233 PipeSetup_LaunchFailure |
| 234 #endif |
| 235 TEST_F(EmbedderTest, MAYBE_PipeSetup_LaunchFailure) { |
| 228 PlatformChannelPair pair; | 236 PlatformChannelPair pair; |
| 229 | 237 |
| 230 std::string child_token = GenerateRandomToken(); | 238 std::string child_token = GenerateRandomToken(); |
| 231 std::string pipe_token = GenerateRandomToken(); | 239 std::string pipe_token = GenerateRandomToken(); |
| 232 | 240 |
| 233 ScopedMessagePipeHandle parent_mp = | 241 ScopedMessagePipeHandle parent_mp = |
| 234 CreateParentMessagePipe(pipe_token, child_token); | 242 CreateParentMessagePipe(pipe_token, child_token); |
| 235 | 243 |
| 236 ChildProcessLaunchFailed(child_token); | 244 ChildProcessLaunchFailed(child_token); |
| 237 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(parent_mp.get().value(), | 245 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(parent_mp.get().value(), |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 client_mp) { | 661 client_mp) { |
| 654 ASSERT_EQ(MOJO_RESULT_OK, MojoWait(client_mp, MOJO_HANDLE_SIGNAL_PEER_CLOSED, | 662 ASSERT_EQ(MOJO_RESULT_OK, MojoWait(client_mp, MOJO_HANDLE_SIGNAL_PEER_CLOSED, |
| 655 MOJO_DEADLINE_INDEFINITE, nullptr)); | 663 MOJO_DEADLINE_INDEFINITE, nullptr)); |
| 656 } | 664 } |
| 657 | 665 |
| 658 #endif // !defined(OS_IOS) | 666 #endif // !defined(OS_IOS) |
| 659 | 667 |
| 660 } // namespace | 668 } // namespace |
| 661 } // namespace edk | 669 } // namespace edk |
| 662 } // namespace mojo | 670 } // namespace mojo |
| OLD | NEW |