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

Side by Side Diff: gpu/command_buffer/service/context_group_unittest.cc

Issue 12326146: Refactor/Rename a bunch of GPU stuff (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 | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_state.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) 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 "gpu/command_buffer/service/context_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" 8 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
9 #include "gpu/command_buffer/service/test_helper.h" 9 #include "gpu/command_buffer/service/test_helper.h"
10 #include "gpu/command_buffer/service/texture_manager.h" 10 #include "gpu/command_buffer/service/texture_manager.h"
(...skipping 20 matching lines...) Expand all
31 class ContextGroupTest : public testing::Test { 31 class ContextGroupTest : public testing::Test {
32 public: 32 public:
33 ContextGroupTest() { 33 ContextGroupTest() {
34 } 34 }
35 35
36 protected: 36 protected:
37 virtual void SetUp() { 37 virtual void SetUp() {
38 gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>()); 38 gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
39 ::gfx::GLInterface::SetGLInterface(gl_.get()); 39 ::gfx::GLInterface::SetGLInterface(gl_.get());
40 decoder_.reset(new MockGLES2Decoder()); 40 decoder_.reset(new MockGLES2Decoder());
41 group_ = ContextGroup::Ref(new ContextGroup(NULL, NULL, NULL, true)); 41 group_ = scoped_refptr<ContextGroup>(
42 new ContextGroup(NULL, NULL, NULL, true));
42 } 43 }
43 44
44 virtual void TearDown() { 45 virtual void TearDown() {
45 ::gfx::GLInterface::SetGLInterface(NULL); 46 ::gfx::GLInterface::SetGLInterface(NULL);
46 gl_.reset(); 47 gl_.reset();
47 } 48 }
48 49
49 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; 50 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
50 scoped_ptr<MockGLES2Decoder> decoder_; 51 scoped_ptr<MockGLES2Decoder> decoder_;
51 ContextGroup::Ref group_; 52 scoped_refptr<ContextGroup> group_;
52 }; 53 };
53 54
54 TEST_F(ContextGroupTest, Basic) { 55 TEST_F(ContextGroupTest, Basic) {
55 // Test it starts off uninitialized. 56 // Test it starts off uninitialized.
56 EXPECT_EQ(0u, group_->max_vertex_attribs()); 57 EXPECT_EQ(0u, group_->max_vertex_attribs());
57 EXPECT_EQ(0u, group_->max_texture_units()); 58 EXPECT_EQ(0u, group_->max_texture_units());
58 EXPECT_EQ(0u, group_->max_texture_image_units()); 59 EXPECT_EQ(0u, group_->max_texture_image_units());
59 EXPECT_EQ(0u, group_->max_vertex_texture_image_units()); 60 EXPECT_EQ(0u, group_->max_vertex_texture_image_units());
60 EXPECT_EQ(0u, group_->max_fragment_uniform_vectors()); 61 EXPECT_EQ(0u, group_->max_fragment_uniform_vectors());
61 EXPECT_EQ(0u, group_->max_varying_vectors()); 62 EXPECT_EQ(0u, group_->max_varying_vectors());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); 133 EXPECT_TRUE(group_->renderbuffer_manager() == NULL);
133 EXPECT_TRUE(group_->texture_manager() == NULL); 134 EXPECT_TRUE(group_->texture_manager() == NULL);
134 EXPECT_TRUE(group_->program_manager() == NULL); 135 EXPECT_TRUE(group_->program_manager() == NULL);
135 EXPECT_TRUE(group_->shader_manager() == NULL); 136 EXPECT_TRUE(group_->shader_manager() == NULL);
136 } 137 }
137 138
138 } // namespace gles2 139 } // namespace gles2
139 } // namespace gpu 140 } // namespace gpu
140 141
141 142
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698