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 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ | 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ |
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ | 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ |
7 | 7 |
8 #include "base/message_loop/message_loop.h" | |
9 #include "base/test/test_io_thread.h" | |
10 #include "mojo/edk/embedder/simple_platform_support.h" | |
11 #include "mojo/edk/system/test_utils.h" | |
12 #include "mojo/edk/test/multiprocess_test_helper.h" | 8 #include "mojo/edk/test/multiprocess_test_helper.h" |
13 #include "mojo/edk/test/scoped_ipc_support.h" | |
14 #include "mojo/public/cpp/system/macros.h" | 9 #include "mojo/public/cpp/system/macros.h" |
15 | 10 |
16 namespace mojo { | 11 namespace mojo { |
17 namespace edk { | 12 namespace edk { |
18 | 13 |
19 class ChannelEndpoint; | 14 class ChannelEndpoint; |
20 class MessagePipe; | 15 class MessagePipe; |
21 | 16 |
22 namespace test { | 17 namespace test { |
23 | 18 |
24 #if !defined(OS_IOS) | 19 #if !defined(OS_IOS) |
25 class MultiprocessMessagePipeTestBase : public testing::Test { | 20 class MultiprocessMessagePipeTestBase : public testing::Test { |
26 public: | 21 public: |
27 MultiprocessMessagePipeTestBase(); | 22 MultiprocessMessagePipeTestBase(); |
28 MultiprocessMessagePipeTestBase( | |
29 base::MessageLoop::Type main_message_loop_type); | |
30 ~MultiprocessMessagePipeTestBase() override; | 23 ~MultiprocessMessagePipeTestBase() override; |
31 | 24 |
32 protected: | 25 protected: |
33 PlatformSupport* platform_support() { return &platform_support_; } | |
34 test::MultiprocessTestHelper* helper() { return &helper_; } | 26 test::MultiprocessTestHelper* helper() { return &helper_; } |
35 | 27 |
36 private: | 28 private: |
37 SimplePlatformSupport platform_support_; | |
38 base::MessageLoop message_loop_; | |
39 base::TestIOThread test_io_thread_; | |
40 test::ScopedIPCSupport ipc_support_; | |
41 test::MultiprocessTestHelper helper_; | 29 test::MultiprocessTestHelper helper_; |
42 | 30 |
43 MOJO_DISALLOW_COPY_AND_ASSIGN(MultiprocessMessagePipeTestBase); | 31 MOJO_DISALLOW_COPY_AND_ASSIGN(MultiprocessMessagePipeTestBase); |
44 }; | 32 }; |
45 #endif | 33 #endif |
46 | 34 |
47 } // namespace test | 35 } // namespace test |
48 } // namespace edk | 36 } // namespace edk |
49 } // namespace mojo | 37 } // namespace mojo |
50 | 38 |
51 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ | 39 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ |
OLD | NEW |