| 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 "mojo/edk/system/ipc_support.h" | 5 #include "mojo/edk/system/ipc_support.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "mojo/edk/system/process_identifier.h" | 23 #include "mojo/edk/system/process_identifier.h" |
| 24 #include "mojo/edk/system/test/test_io_thread.h" | 24 #include "mojo/edk/system/test/test_io_thread.h" |
| 25 #include "mojo/edk/system/test/timeouts.h" | 25 #include "mojo/edk/system/test/timeouts.h" |
| 26 #include "mojo/edk/system/waitable_event.h" | 26 #include "mojo/edk/system/waitable_event.h" |
| 27 #include "mojo/edk/system/waiter.h" | 27 #include "mojo/edk/system/waiter.h" |
| 28 #include "mojo/edk/test/multiprocess_test_helper.h" | 28 #include "mojo/edk/test/multiprocess_test_helper.h" |
| 29 #include "mojo/edk/test/test_utils.h" | 29 #include "mojo/edk/test/test_utils.h" |
| 30 #include "mojo/public/cpp/system/macros.h" | 30 #include "mojo/public/cpp/system/macros.h" |
| 31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
| 32 | 32 |
| 33 using mojo::util::RefPtr; |
| 34 |
| 33 namespace mojo { | 35 namespace mojo { |
| 34 namespace system { | 36 namespace system { |
| 35 namespace { | 37 namespace { |
| 36 | 38 |
| 37 const char kConnectionIdFlag[] = "test-connection-id"; | 39 const char kConnectionIdFlag[] = "test-connection-id"; |
| 38 | 40 |
| 39 // Tests writing a message (containing just data) to |write_mp| and then reading | 41 // Tests writing a message (containing just data) to |write_mp| and then reading |
| 40 // it from |read_mp| (it should be the next message, i.e., there should be no | 42 // it from |read_mp| (it should be the next message, i.e., there should be no |
| 41 // other messages already enqueued in that direction). | 43 // other messages already enqueued in that direction). |
| 42 void TestWriteReadMessage(MessagePipeDispatcher* write_mp, | 44 void TestWriteReadMessage(MessagePipeDispatcher* write_mp, |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 | 706 |
| 705 test_io_thread.PostTaskAndWait(base::Bind(&IPCSupport::ShutdownOnIOThread, | 707 test_io_thread.PostTaskAndWait(base::Bind(&IPCSupport::ShutdownOnIOThread, |
| 706 base::Unretained(&ipc_support))); | 708 base::Unretained(&ipc_support))); |
| 707 } | 709 } |
| 708 | 710 |
| 709 // TODO(vtl): Also test the case of the master "dying" before the slave. (The | 711 // TODO(vtl): Also test the case of the master "dying" before the slave. (The |
| 710 // slave should get OnMasterDisconnect(), which we currently don't test.) | 712 // slave should get OnMasterDisconnect(), which we currently don't test.) |
| 711 | 713 |
| 712 } // namespace system | 714 } // namespace system |
| 713 } // namespace mojo | 715 } // namespace mojo |
| OLD | NEW |