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 | |
290 void CreateHostGlobals(); | 288 void CreateHostGlobals(); |
291 | 289 |
292 GlobalsConfiguration globals_config_; | 290 GlobalsConfiguration globals_config_; |
293 scoped_ptr<ppapi::TestGlobals> host_globals_; | 291 scoped_ptr<ppapi::TestGlobals> host_globals_; |
294 scoped_ptr<HostDispatcher> host_dispatcher_; | 292 scoped_ptr<HostDispatcher> host_dispatcher_; |
295 DelegateMock delegate_mock_; | 293 DelegateMock delegate_mock_; |
296 | |
297 scoped_ptr<MockSyncMessageStatusReceiver> status_receiver_; | |
298 }; | 294 }; |
299 | 295 |
300 class HostProxyTest : public HostProxyTestHarness, public testing::Test { | 296 class HostProxyTest : public HostProxyTestHarness, public testing::Test { |
301 public: | 297 public: |
302 HostProxyTest(); | 298 HostProxyTest(); |
303 virtual ~HostProxyTest(); | 299 virtual ~HostProxyTest(); |
304 | 300 |
305 // testing::Test implementation. | 301 // testing::Test implementation. |
306 virtual void SetUp(); | 302 virtual void SetUp(); |
307 virtual void TearDown(); | 303 virtual void TearDown(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // EXPECT_VAR_IS_STRING("foo", my_var); | 359 // EXPECT_VAR_IS_STRING("foo", my_var); |
364 #define EXPECT_VAR_IS_STRING(str, var) { \ | 360 #define EXPECT_VAR_IS_STRING(str, var) { \ |
365 StringVar* sv = StringVar::FromPPVar(var); \ | 361 StringVar* sv = StringVar::FromPPVar(var); \ |
366 EXPECT_TRUE(sv); \ | 362 EXPECT_TRUE(sv); \ |
367 if (sv) \ | 363 if (sv) \ |
368 EXPECT_EQ(str, sv->value()); \ | 364 EXPECT_EQ(str, sv->value()); \ |
369 } | 365 } |
370 | 366 |
371 } // namespace proxy | 367 } // namespace proxy |
372 } // namespace ppapi | 368 } // namespace ppapi |
OLD | NEW |