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

Side by Side Diff: o3d/gpu_plugin/gpu_plugin_unittest.cc

Issue 196032: Replaced BaseNPObject with DefaultNPObject because...... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « o3d/gpu_plugin/gpu_plugin_object_unittest.cc ('k') | o3d/gpu_plugin/np_utils/base_np_object.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "o3d/gpu_plugin/gpu_plugin.h" 5 #include "o3d/gpu_plugin/gpu_plugin.h"
6 #include "o3d/gpu_plugin/gpu_plugin_object.h" 6 #include "o3d/gpu_plugin/gpu_plugin_object.h"
7 #include "o3d/gpu_plugin/np_utils/base_np_object_mock.h" 7 #include "o3d/gpu_plugin/np_utils/np_object_mock.h"
8 #include "o3d/gpu_plugin/np_utils/np_plugin_object_factory_mock.h" 8 #include "o3d/gpu_plugin/np_utils/np_plugin_object_factory_mock.h"
9 #include "o3d/gpu_plugin/np_utils/np_plugin_object_mock.h" 9 #include "o3d/gpu_plugin/np_utils/np_plugin_object_mock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "webkit/glue/plugins/nphostapi.h" 11 #include "webkit/glue/plugins/nphostapi.h"
12 12
13 #if defined(OS_LINUX) 13 #if defined(OS_LINUX)
14 #define INITIALIZE_PLUGIN_FUNCS , &plugin_funcs_ 14 #define INITIALIZE_PLUGIN_FUNCS , &plugin_funcs_
15 #else 15 #else
16 #define INITIALIZE_PLUGIN_FUNCS 16 #define INITIALIZE_PLUGIN_FUNCS
17 #endif 17 #endif
(...skipping 10 matching lines...) Expand all
28 28
29 class GPUPluginTest : public testing::Test { 29 class GPUPluginTest : public testing::Test {
30 protected: 30 protected:
31 virtual void SetUp() { 31 virtual void SetUp() {
32 memset(&npp_, 0, sizeof(npp_)); 32 memset(&npp_, 0, sizeof(npp_));
33 memset(&browser_funcs_, 0, sizeof(browser_funcs_)); 33 memset(&browser_funcs_, 0, sizeof(browser_funcs_));
34 memset(&plugin_funcs_, 0, sizeof(plugin_funcs_)); 34 memset(&plugin_funcs_, 0, sizeof(plugin_funcs_));
35 35
36 plugin_object_factory_ = new StrictMock<MockPluginObjectFactory>; 36 plugin_object_factory_ = new StrictMock<MockPluginObjectFactory>;
37 37
38 np_class_ = BaseNPObject::GetNPClass<StrictMock<MockBaseNPObject> >(); 38 np_class_ = NPGetClass<StrictMock<MockNPObject> >();
39 } 39 }
40 40
41 virtual void TearDown() { 41 virtual void TearDown() {
42 delete plugin_object_factory_; 42 delete plugin_object_factory_;
43 } 43 }
44 44
45 NPP_t npp_; 45 NPP_t npp_;
46 NPNetscapeFuncs browser_funcs_; 46 NPNetscapeFuncs browser_funcs_;
47 NPPluginFuncs plugin_funcs_; 47 NPPluginFuncs plugin_funcs_;
48 MockPluginObjectFactory* plugin_object_factory_; 48 MockPluginObjectFactory* plugin_object_factory_;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 EXPECT_EQ(NPERR_GENERIC_ERROR, plugin_funcs_.getvalue( 292 EXPECT_EQ(NPERR_GENERIC_ERROR, plugin_funcs_.getvalue(
293 &npp_, NPPVjavaClass, &result)); 293 &npp_, NPPVjavaClass, &result));
294 294
295 EXPECT_EQ(NPERR_NO_ERROR, plugin_funcs_.destroy(&npp_, NULL)); 295 EXPECT_EQ(NPERR_NO_ERROR, plugin_funcs_.destroy(&npp_, NULL));
296 296
297 NP_Shutdown(); 297 NP_Shutdown();
298 } 298 }
299 299
300 } // namespace gpu_plugin 300 } // namespace gpu_plugin
301 } // namespace o3d 301 } // namespace o3d
OLDNEW
« no previous file with comments | « o3d/gpu_plugin/gpu_plugin_object_unittest.cc ('k') | o3d/gpu_plugin/np_utils/base_np_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698