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 <stdint.h> | 6 #include <stdint.h> |
6 #include <stdio.h> | 7 #include <stdio.h> |
7 #include <string.h> | 8 #include <string.h> |
8 #include <string> | 9 #include <string> |
9 #include <utility> | 10 #include <utility> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], | 531 CHECK_EQ(MojoReadMessage(handles[0], &read_buffer[0], |
531 &read_buffer_size, nullptr, | 532 &read_buffer_size, nullptr, |
532 0, MOJO_READ_MESSAGE_FLAG_NONE), | 533 0, MOJO_READ_MESSAGE_FLAG_NONE), |
533 MOJO_RESULT_OK); | 534 MOJO_RESULT_OK); |
534 read_buffer.resize(read_buffer_size); | 535 read_buffer.resize(read_buffer_size); |
535 CHECK_EQ(read_buffer, std::string("hello")); | 536 CHECK_EQ(read_buffer, std::string("hello")); |
536 | 537 |
537 // Now write some data into the message pipe. | 538 // Now write some data into the message pipe. |
538 std::string write_buffer = "world"; | 539 std::string write_buffer = "world"; |
539 CHECK_EQ(MojoWriteMessage(handles[0], write_buffer.data(), | 540 CHECK_EQ(MojoWriteMessage(handles[0], write_buffer.data(), |
540 static_cast<uint32>(write_buffer.size()), | 541 static_cast<uint32_t>(write_buffer.size()), nullptr, |
541 nullptr, 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), | 542 0u, MOJO_WRITE_MESSAGE_FLAG_NONE), |
542 MOJO_RESULT_OK); | 543 MOJO_RESULT_OK); |
543 MojoClose(handles[0]); | 544 MojoClose(handles[0]); |
544 return 0; | 545 return 0; |
545 } | 546 } |
546 | 547 |
547 #if defined(OS_ANDROID) | 548 #if defined(OS_ANDROID) |
548 // Android multi-process tests are not executing the new process. This is flaky. | 549 // Android multi-process tests are not executing the new process. This is flaky. |
549 #define MAYBE_MessagePipePassing DISABLED_MessagePipePassing | 550 #define MAYBE_MessagePipePassing DISABLED_MessagePipePassing |
550 #else | 551 #else |
551 #define MAYBE_MessagePipePassing MessagePipePassing | 552 #define MAYBE_MessagePipePassing MessagePipePassing |
552 #endif | 553 #endif |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 753 |
753 MojoClose(mp1); | 754 MojoClose(mp1); |
754 MojoClose(mp.release().value()); | 755 MojoClose(mp.release().value()); |
755 | 756 |
756 ASSERT_EQ(0, helper()->WaitForChildShutdown()); | 757 ASSERT_EQ(0, helper()->WaitForChildShutdown()); |
757 } | 758 } |
758 | 759 |
759 } // namespace | 760 } // namespace |
760 } // namespace edk | 761 } // namespace edk |
761 } // namespace mojo | 762 } // namespace mojo |
OLD | NEW |