Index: ppapi/proxy/ppapi_proxy_test.cc |
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc |
index 52fe44bbfc0328dcf1fa3c9a94b44a2c69a33b0f..117a80c2d2224aa3a0f89b40b3aff216eb63128c 100644 |
--- a/ppapi/proxy/ppapi_proxy_test.cc |
+++ b/ppapi/proxy/ppapi_proxy_test.cc |
@@ -175,7 +175,6 @@ void PluginProxyTestHarness::SetUpHarness() { |
PpapiPermissions(), |
false)); |
plugin_dispatcher_->InitWithTestSink(&sink()); |
- plugin_dispatcher_->DidCreateInstance(pp_instance()); |
// The plugin proxy delegate is needed for |
// |PluginProxyDelegate::GetBrowserSender| which is used |
// in |ResourceCreationProxy::GetConnection| to get the channel to the |
@@ -183,6 +182,7 @@ void PluginProxyTestHarness::SetUpHarness() { |
// for test purposes. |
plugin_delegate_mock_.set_browser_sender(plugin_dispatcher_.get()); |
PluginGlobals::Get()->set_plugin_proxy_delegate(&plugin_delegate_mock_); |
+ plugin_dispatcher_->DidCreateInstance(pp_instance()); |
} |
void PluginProxyTestHarness::SetUpHarnessWithChannel( |
@@ -204,6 +204,8 @@ void PluginProxyTestHarness::SetUpHarnessWithChannel( |
plugin_dispatcher_->InitPluginWithChannel(&plugin_delegate_mock_, |
channel_handle, |
is_client); |
+ plugin_delegate_mock_.set_browser_sender(plugin_dispatcher_.get()); |
+ PluginGlobals::Get()->set_plugin_proxy_delegate(&plugin_delegate_mock_); |
plugin_dispatcher_->DidCreateInstance(pp_instance()); |
} |