OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 bool should_close_source) OVERRIDE; | 278 bool should_close_source) OVERRIDE; |
279 | 279 |
280 private: | 280 private: |
281 base::MessageLoopProxy* ipc_message_loop_; // Weak | 281 base::MessageLoopProxy* ipc_message_loop_; // Weak |
282 base::WaitableEvent* shutdown_event_; // Weak | 282 base::WaitableEvent* shutdown_event_; // Weak |
283 | 283 |
284 DISALLOW_COPY_AND_ASSIGN(DelegateMock); | 284 DISALLOW_COPY_AND_ASSIGN(DelegateMock); |
285 }; | 285 }; |
286 | 286 |
287 private: | 287 private: |
| 288 class MockSyncMessageStatusReceiver; |
| 289 |
288 void CreateHostGlobals(); | 290 void CreateHostGlobals(); |
289 | 291 |
290 GlobalsConfiguration globals_config_; | 292 GlobalsConfiguration globals_config_; |
291 scoped_ptr<ppapi::TestGlobals> host_globals_; | 293 scoped_ptr<ppapi::TestGlobals> host_globals_; |
292 scoped_ptr<HostDispatcher> host_dispatcher_; | 294 scoped_ptr<HostDispatcher> host_dispatcher_; |
293 DelegateMock delegate_mock_; | 295 DelegateMock delegate_mock_; |
| 296 |
| 297 scoped_ptr<MockSyncMessageStatusReceiver> status_receiver_; |
294 }; | 298 }; |
295 | 299 |
296 class HostProxyTest : public HostProxyTestHarness, public testing::Test { | 300 class HostProxyTest : public HostProxyTestHarness, public testing::Test { |
297 public: | 301 public: |
298 HostProxyTest(); | 302 HostProxyTest(); |
299 virtual ~HostProxyTest(); | 303 virtual ~HostProxyTest(); |
300 | 304 |
301 // testing::Test implementation. | 305 // testing::Test implementation. |
302 virtual void SetUp(); | 306 virtual void SetUp(); |
303 virtual void TearDown(); | 307 virtual void TearDown(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // EXPECT_VAR_IS_STRING("foo", my_var); | 363 // EXPECT_VAR_IS_STRING("foo", my_var); |
360 #define EXPECT_VAR_IS_STRING(str, var) { \ | 364 #define EXPECT_VAR_IS_STRING(str, var) { \ |
361 StringVar* sv = StringVar::FromPPVar(var); \ | 365 StringVar* sv = StringVar::FromPPVar(var); \ |
362 EXPECT_TRUE(sv); \ | 366 EXPECT_TRUE(sv); \ |
363 if (sv) \ | 367 if (sv) \ |
364 EXPECT_EQ(str, sv->value()); \ | 368 EXPECT_EQ(str, sv->value()); \ |
365 } | 369 } |
366 | 370 |
367 } // namespace proxy | 371 } // namespace proxy |
368 } // namespace ppapi | 372 } // namespace ppapi |
OLD | NEW |