| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "ppapi/c/dev/ppb_var_deprecated.h" | 9 #include "ppapi/c/dev/ppb_var_deprecated.h" |
| 10 #include "ppapi/c/dev/ppp_class_deprecated.h" | 10 #include "ppapi/c/dev/ppp_class_deprecated.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 &ppp_instance_private_mock); | 140 &ppp_instance_private_mock); |
| 141 plugin().RegisterTestInterface(PPP_INSTANCE_INTERFACE_1_0, | 141 plugin().RegisterTestInterface(PPP_INSTANCE_INTERFACE_1_0, |
| 142 &ppp_instance_mock); | 142 &ppp_instance_mock); |
| 143 host().RegisterTestInterface(PPB_VAR_DEPRECATED_INTERFACE, | 143 host().RegisterTestInterface(PPB_VAR_DEPRECATED_INTERFACE, |
| 144 &ppb_var_deprecated_mock); | 144 &ppb_var_deprecated_mock); |
| 145 } | 145 } |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace | 148 } // namespace |
| 149 | 149 |
| 150 // TODO(raymes): This #ifdef is only here because we check the state of the | |
| 151 // plugin globals on the main thread, rather than the plugin thread which causes | |
| 152 // the thread checker to fail. Once ENABLE_PEPPER_THREADING is the default, | |
| 153 // this will be safe to do anyway, so we can remove this. | |
| 154 #ifdef ENABLE_PEPPER_THREADING | |
| 155 TEST_F(PPP_Instance_Private_ProxyTest, PPPInstancePrivate) { | 150 TEST_F(PPP_Instance_Private_ProxyTest, PPPInstancePrivate) { |
| 156 #else | |
| 157 TEST_F(PPP_Instance_Private_ProxyTest, DISABLED_PPPInstancePrivate) { | |
| 158 #endif | |
| 159 // This test controls its own instance; we can't use the one that | 151 // This test controls its own instance; we can't use the one that |
| 160 // PluginProxyTestHarness provides. | 152 // PluginProxyTestHarness provides. |
| 161 ASSERT_NE(kInstance, pp_instance()); | 153 ASSERT_NE(kInstance, pp_instance()); |
| 162 HostDispatcher::SetForInstance(kInstance, host().host_dispatcher()); | 154 HostDispatcher::SetForInstance(kInstance, host().host_dispatcher()); |
| 163 | 155 |
| 164 // Requires dev interfaces. | 156 // Requires dev interfaces. |
| 165 InterfaceList::SetProcessGlobalPermissions( | 157 InterfaceList::SetProcessGlobalPermissions( |
| 166 PpapiPermissions::AllPermissions()); | 158 PpapiPermissions::AllPermissions()); |
| 167 | 159 |
| 168 // This file-local global is used by the PPP_Instance mock above in order to | 160 // This file-local global is used by the PPP_Instance mock above in order to |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Destroy the instance. DidDestroy above decrements the reference count for | 201 // Destroy the instance. DidDestroy above decrements the reference count for |
| 210 // instance_obj, so it should also be destroyed. | 202 // instance_obj, so it should also be destroyed. |
| 211 ppp_instance->DidDestroy(kInstance); | 203 ppp_instance->DidDestroy(kInstance); |
| 212 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj)); | 204 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj)); |
| 213 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var)); | 205 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var)); |
| 214 } | 206 } |
| 215 | 207 |
| 216 } // namespace proxy | 208 } // namespace proxy |
| 217 } // namespace ppapi | 209 } // namespace ppapi |
| 218 | 210 |
| OLD | NEW |