OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 }; | 130 }; |
131 | 131 |
132 class PluginProxyTest : public PluginProxyTestHarness, public testing::Test { | 132 class PluginProxyTest : public PluginProxyTestHarness, public testing::Test { |
133 public: | 133 public: |
134 PluginProxyTest(); | 134 PluginProxyTest(); |
135 virtual ~PluginProxyTest(); | 135 virtual ~PluginProxyTest(); |
136 | 136 |
137 // testing::Test implementation. | 137 // testing::Test implementation. |
138 virtual void SetUp(); | 138 virtual void SetUp(); |
139 virtual void TearDown(); | 139 virtual void TearDown(); |
| 140 private: |
| 141 MessageLoop message_loop_; |
140 }; | 142 }; |
141 | 143 |
142 class HostProxyTestHarness : public ProxyTestHarnessBase { | 144 class HostProxyTestHarness : public ProxyTestHarnessBase { |
143 public: | 145 public: |
144 HostProxyTestHarness(); | 146 HostProxyTestHarness(); |
145 virtual ~HostProxyTestHarness(); | 147 virtual ~HostProxyTestHarness(); |
146 | 148 |
147 HostDispatcher* host_dispatcher() { return host_dispatcher_.get(); } | 149 HostDispatcher* host_dispatcher() { return host_dispatcher_.get(); } |
148 | 150 |
149 // ProxyTestBase implementation. | 151 // ProxyTestBase implementation. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 }; | 186 }; |
185 | 187 |
186 class HostProxyTest : public HostProxyTestHarness, public testing::Test { | 188 class HostProxyTest : public HostProxyTestHarness, public testing::Test { |
187 public: | 189 public: |
188 HostProxyTest(); | 190 HostProxyTest(); |
189 virtual ~HostProxyTest(); | 191 virtual ~HostProxyTest(); |
190 | 192 |
191 // testing::Test implementation. | 193 // testing::Test implementation. |
192 virtual void SetUp(); | 194 virtual void SetUp(); |
193 virtual void TearDown(); | 195 virtual void TearDown(); |
| 196 private: |
| 197 MessageLoop message_loop_; |
194 }; | 198 }; |
195 | 199 |
196 // Use this base class to test both sides of a proxy. | 200 // Use this base class to test both sides of a proxy. |
197 class TwoWayTest : public testing::Test { | 201 class TwoWayTest : public testing::Test { |
198 public: | 202 public: |
199 enum TwoWayTestMode { | 203 enum TwoWayTestMode { |
200 TEST_PPP_INTERFACE, | 204 TEST_PPP_INTERFACE, |
201 TEST_PPB_INTERFACE | 205 TEST_PPB_INTERFACE |
202 }; | 206 }; |
203 TwoWayTest(TwoWayTestMode test_mode); | 207 TwoWayTest(TwoWayTestMode test_mode); |
(...skipping 26 matching lines...) Expand all Loading... |
230 // stopping the harnesses. | 234 // stopping the harnesses. |
231 ProxyTestHarnessBase* remote_harness_; | 235 ProxyTestHarnessBase* remote_harness_; |
232 ProxyTestHarnessBase* local_harness_; | 236 ProxyTestHarnessBase* local_harness_; |
233 | 237 |
234 base::WaitableEvent channel_created_; | 238 base::WaitableEvent channel_created_; |
235 base::WaitableEvent shutdown_event_; | 239 base::WaitableEvent shutdown_event_; |
236 }; | 240 }; |
237 | 241 |
238 } // namespace proxy | 242 } // namespace proxy |
239 } // namespace pp | 243 } // namespace pp |
OLD | NEW |