Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: ppapi/proxy/ppp_instance_private_proxy_unittest.cc

Issue 12476028: Revert 187340 "PPAPI: Remove threading options; it's always on" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_var_unittest.cc ('k') | ppapi/proxy/ppp_instance_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
150 TEST_F(PPP_Instance_Private_ProxyTest, PPPInstancePrivate) { 155 TEST_F(PPP_Instance_Private_ProxyTest, PPPInstancePrivate) {
156 #else
157 TEST_F(PPP_Instance_Private_ProxyTest, DISABLED_PPPInstancePrivate) {
158 #endif
151 // This test controls its own instance; we can't use the one that 159 // This test controls its own instance; we can't use the one that
152 // PluginProxyTestHarness provides. 160 // PluginProxyTestHarness provides.
153 ASSERT_NE(kInstance, pp_instance()); 161 ASSERT_NE(kInstance, pp_instance());
154 HostDispatcher::SetForInstance(kInstance, host().host_dispatcher()); 162 HostDispatcher::SetForInstance(kInstance, host().host_dispatcher());
155 163
156 // Requires dev interfaces. 164 // Requires dev interfaces.
157 InterfaceList::SetProcessGlobalPermissions( 165 InterfaceList::SetProcessGlobalPermissions(
158 PpapiPermissions::AllPermissions()); 166 PpapiPermissions::AllPermissions());
159 167
160 // This file-local global is used by the PPP_Instance mock above in order to 168 // 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
201 // Destroy the instance. DidDestroy above decrements the reference count for 209 // Destroy the instance. DidDestroy above decrements the reference count for
202 // instance_obj, so it should also be destroyed. 210 // instance_obj, so it should also be destroyed.
203 ppp_instance->DidDestroy(kInstance); 211 ppp_instance->DidDestroy(kInstance);
204 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj)); 212 EXPECT_EQ(-1, plugin().var_tracker().GetRefCountForObject(instance_obj));
205 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var)); 213 EXPECT_EQ(-1, host().var_tracker().GetRefCountForObject(host_pp_var));
206 } 214 }
207 215
208 } // namespace proxy 216 } // namespace proxy
209 } // namespace ppapi 217 } // namespace ppapi
210 218
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_var_unittest.cc ('k') | ppapi/proxy/ppp_instance_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698