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_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ | 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ |
6 #define MOJO_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ | 6 #define MOJO_SYSTEM_MESSAGE_PIPE_TEST_UTILS_H_ |
7 | 7 |
8 #include "base/test/test_io_thread.h" | 8 #include "base/test/test_io_thread.h" |
9 #include "mojo/common/test/multiprocess_test_helper.h" | 9 #include "mojo/common/test/multiprocess_test_helper.h" |
10 #include "mojo/embedder/simple_platform_support.h" | 10 #include "mojo/embedder/simple_platform_support.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 scoped_refptr<MessagePipe> message_pipe); | 34 scoped_refptr<MessagePipe> message_pipe); |
35 void ShutdownChannelOnIOThread(); | 35 void ShutdownChannelOnIOThread(); |
36 | 36 |
37 embedder::PlatformSupport* const platform_support_; | 37 embedder::PlatformSupport* const platform_support_; |
38 base::TestIOThread test_io_thread_; | 38 base::TestIOThread test_io_thread_; |
39 scoped_refptr<Channel> channel_; | 39 scoped_refptr<Channel> channel_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(ChannelThread); | 41 DISALLOW_COPY_AND_ASSIGN(ChannelThread); |
42 }; | 42 }; |
43 | 43 |
| 44 #if !defined(OS_IOS) |
44 class MultiprocessMessagePipeTestBase : public testing::Test { | 45 class MultiprocessMessagePipeTestBase : public testing::Test { |
45 public: | 46 public: |
46 MultiprocessMessagePipeTestBase(); | 47 MultiprocessMessagePipeTestBase(); |
47 virtual ~MultiprocessMessagePipeTestBase(); | 48 virtual ~MultiprocessMessagePipeTestBase(); |
48 | 49 |
49 protected: | 50 protected: |
50 void Init(scoped_refptr<MessagePipe> mp); | 51 void Init(scoped_refptr<MessagePipe> mp); |
51 | 52 |
52 embedder::PlatformSupport* platform_support() { return &platform_support_; } | 53 embedder::PlatformSupport* platform_support() { return &platform_support_; } |
53 mojo::test::MultiprocessTestHelper* helper() { return &helper_; } | 54 mojo::test::MultiprocessTestHelper* helper() { return &helper_; } |
54 | 55 |
55 private: | 56 private: |
56 embedder::SimplePlatformSupport platform_support_; | 57 embedder::SimplePlatformSupport platform_support_; |
57 ChannelThread channel_thread_; | 58 ChannelThread channel_thread_; |
58 mojo::test::MultiprocessTestHelper helper_; | 59 mojo::test::MultiprocessTestHelper helper_; |
59 | 60 |
60 DISALLOW_COPY_AND_ASSIGN(MultiprocessMessagePipeTestBase); | 61 DISALLOW_COPY_AND_ASSIGN(MultiprocessMessagePipeTestBase); |
61 }; | 62 }; |
| 63 #endif |
62 | 64 |
63 } // namespace test | 65 } // namespace test |
64 } // namespace system | 66 } // namespace system |
65 } // namespace mojo | 67 } // namespace mojo |
66 | 68 |
67 #endif // MOJO_SYSTEM_MESSAGE_PIPE_TEST_HELPER_H_ | 69 #endif // MOJO_SYSTEM_MESSAGE_PIPE_TEST_HELPER_H_ |
OLD | NEW |