| 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 <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/test/test_timeouts.h" | 16 #include "base/test/test_timeouts.h" |
| 17 #include "mojo/edk/embedder/platform_channel_pair.h" | 17 #include "mojo/edk/embedder/platform_channel_pair.h" |
| 18 #include "mojo/edk/embedder/test_embedder.h" | 18 #include "mojo/edk/embedder/test_embedder.h" |
| 19 #include "mojo/edk/system/mutex.h" | 19 #include "mojo/edk/system/mutex.h" |
| 20 #include "mojo/edk/system/test/test_io_thread.h" |
| 20 #include "mojo/edk/system/test/timeouts.h" | 21 #include "mojo/edk/system/test/timeouts.h" |
| 21 #include "mojo/edk/test/multiprocess_test_helper.h" | 22 #include "mojo/edk/test/multiprocess_test_helper.h" |
| 22 #include "mojo/edk/test/scoped_ipc_support.h" | 23 #include "mojo/edk/test/scoped_ipc_support.h" |
| 23 #include "mojo/edk/test/test_io_thread.h" | |
| 24 #include "mojo/public/c/system/core.h" | 24 #include "mojo/public/c/system/core.h" |
| 25 #include "mojo/public/cpp/system/handle.h" | 25 #include "mojo/public/cpp/system/handle.h" |
| 26 #include "mojo/public/cpp/system/macros.h" | 26 #include "mojo/public/cpp/system/macros.h" |
| 27 #include "mojo/public/cpp/system/message_pipe.h" | 27 #include "mojo/public/cpp/system/message_pipe.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| 30 using mojo::system::test::TestIOThread; |
| 31 |
| 30 namespace mojo { | 32 namespace mojo { |
| 31 | |
| 32 using test::TestIOThread; | |
| 33 | |
| 34 namespace embedder { | 33 namespace embedder { |
| 35 namespace { | 34 namespace { |
| 36 | 35 |
| 37 const MojoHandleSignals kSignalReadadableWritable = | 36 const MojoHandleSignals kSignalReadadableWritable = |
| 38 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE; | 37 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE; |
| 39 | 38 |
| 40 const MojoHandleSignals kSignalAll = MOJO_HANDLE_SIGNAL_READABLE | | 39 const MojoHandleSignals kSignalAll = MOJO_HANDLE_SIGNAL_READABLE | |
| 41 MOJO_HANDLE_SIGNAL_WRITABLE | | 40 MOJO_HANDLE_SIGNAL_WRITABLE | |
| 42 MOJO_HANDLE_SIGNAL_PEER_CLOSED; | 41 MOJO_HANDLE_SIGNAL_PEER_CLOSED; |
| 43 | 42 |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 | 778 |
| 780 EXPECT_TRUE(test::Shutdown()); | 779 EXPECT_TRUE(test::Shutdown()); |
| 781 } | 780 } |
| 782 | 781 |
| 783 // TODO(vtl): Test immediate write & close. | 782 // TODO(vtl): Test immediate write & close. |
| 784 // TODO(vtl): Test broken-connection cases. | 783 // TODO(vtl): Test broken-connection cases. |
| 785 | 784 |
| 786 } // namespace | 785 } // namespace |
| 787 } // namespace embedder | 786 } // namespace embedder |
| 788 } // namespace mojo | 787 } // namespace mojo |
| OLD | NEW |