| 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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/proxy/ppapi_messages.h" | 8 #include "ppapi/proxy/ppapi_messages.h" |
| 9 | 9 |
| 10 namespace pp { | 10 namespace pp { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 return plugin_dispatcher_.get(); | 87 return plugin_dispatcher_.get(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void PluginProxyTest::SetUp() { | 90 void PluginProxyTest::SetUp() { |
| 91 // These must be first since the dispatcher set-up uses them. | 91 // These must be first since the dispatcher set-up uses them. |
| 92 PluginResourceTracker::SetInstanceForTest(&resource_tracker_); | 92 PluginResourceTracker::SetInstanceForTest(&resource_tracker_); |
| 93 PluginVarTracker::SetInstanceForTest(&var_tracker_); | 93 PluginVarTracker::SetInstanceForTest(&var_tracker_); |
| 94 | 94 |
| 95 plugin_dispatcher_.reset(new PluginDispatcher( | 95 plugin_dispatcher_.reset(new PluginDispatcher( |
| 96 base::Process::Current().handle(), | 96 base::Process::Current().handle(), |
| 97 &MockGetInterface, | 97 &MockGetInterface)); |
| 98 &MockInitModule, | |
| 99 &MockShutdownModuleFunc)); | |
| 100 plugin_dispatcher_->InitWithTestSink(&sink()); | 98 plugin_dispatcher_->InitWithTestSink(&sink()); |
| 101 plugin_dispatcher_->DidCreateInstance(pp_instance()); | 99 plugin_dispatcher_->DidCreateInstance(pp_instance()); |
| 102 } | 100 } |
| 103 | 101 |
| 104 void PluginProxyTest::TearDown() { | 102 void PluginProxyTest::TearDown() { |
| 105 plugin_dispatcher_->DidDestroyInstance(pp_instance()); | 103 plugin_dispatcher_->DidDestroyInstance(pp_instance()); |
| 106 plugin_dispatcher_.reset(); | 104 plugin_dispatcher_.reset(); |
| 107 | 105 |
| 108 PluginVarTracker::SetInstanceForTest(NULL); | 106 PluginVarTracker::SetInstanceForTest(NULL); |
| 109 PluginResourceTracker::SetInstanceForTest(NULL); | 107 PluginResourceTracker::SetInstanceForTest(NULL); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 130 HostDispatcher::SetForInstance(pp_instance(), host_dispatcher_.get()); | 128 HostDispatcher::SetForInstance(pp_instance(), host_dispatcher_.get()); |
| 131 } | 129 } |
| 132 | 130 |
| 133 void HostProxyTest::TearDown() { | 131 void HostProxyTest::TearDown() { |
| 134 HostDispatcher::RemoveForInstance(pp_instance()); | 132 HostDispatcher::RemoveForInstance(pp_instance()); |
| 135 host_dispatcher_.reset(); | 133 host_dispatcher_.reset(); |
| 136 } | 134 } |
| 137 | 135 |
| 138 } // namespace proxy | 136 } // namespace proxy |
| 139 } // namespace pp | 137 } // namespace pp |
| OLD | NEW |