| Index: ppapi/proxy/ppapi_proxy_test.h
|
| diff --git a/ppapi/proxy/ppapi_proxy_test.h b/ppapi/proxy/ppapi_proxy_test.h
|
| index 2a612ed73a6f81bea858e41d62cd8941ec02ecb4..348471fd321c3354351f1c8cd58e53fdf78de2ac 100644
|
| --- a/ppapi/proxy/ppapi_proxy_test.h
|
| +++ b/ppapi/proxy/ppapi_proxy_test.h
|
| @@ -17,6 +17,8 @@
|
| #include "ppapi/proxy/plugin_proxy_delegate.h"
|
| #include "ppapi/proxy/plugin_resource_tracker.h"
|
| #include "ppapi/proxy/plugin_var_tracker.h"
|
| +#include "ppapi/shared_impl/ppapi_shared_export.h"
|
| +#include "ppapi/shared_impl/test_globals.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace ppapi {
|
| @@ -33,6 +35,7 @@ class ProxyTestHarnessBase {
|
| PP_Instance pp_instance() const { return pp_instance_; }
|
| IPC::TestSink& sink() { return sink_; }
|
|
|
| + virtual PpapiGlobals* GetGlobals() = 0;
|
| // Returns either the plugin or host dispatcher, depending on the test.
|
| virtual Dispatcher* GetDispatcher() = 0;
|
|
|
| @@ -88,6 +91,7 @@ class PluginProxyTestHarness : public ProxyTestHarnessBase {
|
| }
|
|
|
| // ProxyTestHarnessBase implementation.
|
| + virtual PpapiGlobals* GetGlobals() { return &plugin_globals_; }
|
| virtual Dispatcher* GetDispatcher();
|
| virtual void SetUpHarness();
|
| virtual void SetUpHarnessWithChannel(const IPC::ChannelHandle& channel_handle,
|
| @@ -139,7 +143,8 @@ class PluginProxyTestHarness : public ProxyTestHarnessBase {
|
| PluginDelegateMock plugin_delegate_mock_;
|
| };
|
|
|
| -class PluginProxyTest : public PluginProxyTestHarness, public testing::Test {
|
| +class PPAPI_SHARED_EXPORT PluginProxyTest
|
| + : public PluginProxyTestHarness, public testing::Test {
|
| public:
|
| PluginProxyTest();
|
| virtual ~PluginProxyTest();
|
| @@ -156,9 +161,14 @@ class HostProxyTestHarness : public ProxyTestHarnessBase {
|
| HostProxyTestHarness();
|
| virtual ~HostProxyTestHarness();
|
|
|
| + ppapi::TestGlobals* host_globals() { return &host_globals_; }
|
| HostDispatcher* host_dispatcher() { return host_dispatcher_.get(); }
|
| + VarTracker& var_tracker() {
|
| + return *host_globals_.GetVarTracker();
|
| + }
|
|
|
| // ProxyTestBase implementation.
|
| + virtual PpapiGlobals* GetGlobals() { return &host_globals_; }
|
| virtual Dispatcher* GetDispatcher();
|
| virtual void SetUpHarness();
|
| virtual void SetUpHarnessWithChannel(const IPC::ChannelHandle& channel_handle,
|
| @@ -191,11 +201,13 @@ class HostProxyTestHarness : public ProxyTestHarnessBase {
|
| };
|
|
|
| private:
|
| + ppapi::TestGlobals host_globals_;
|
| scoped_ptr<HostDispatcher> host_dispatcher_;
|
| DelegateMock delegate_mock_;
|
| };
|
|
|
| -class HostProxyTest : public HostProxyTestHarness, public testing::Test {
|
| +class PPAPI_SHARED_EXPORT HostProxyTest
|
| + : public HostProxyTestHarness, public testing::Test {
|
| public:
|
| HostProxyTest();
|
| virtual ~HostProxyTest();
|
| @@ -208,7 +220,7 @@ class HostProxyTest : public HostProxyTestHarness, public testing::Test {
|
| };
|
|
|
| // Use this base class to test both sides of a proxy.
|
| -class TwoWayTest : public testing::Test {
|
| +class PPAPI_SHARED_EXPORT TwoWayTest : public testing::Test {
|
| public:
|
| enum TwoWayTestMode {
|
| TEST_PPP_INTERFACE,
|
|
|