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

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

Issue 7765013: Revert 98504 - Manually merging trunk revs 95836 and 96904 to 835 branch (second attempt) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 years, 4 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
OLDNEW
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 "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/common/gl_mock.h" 8 #include "gpu/command_buffer/common/gl_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 19 matching lines...) Expand all
30 30
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 group_ = ContextGroup::Ref(new ContextGroup(true)); 40 group_ = ContextGroup::Ref(new ContextGroup());
41 } 41 }
42 42
43 virtual void TearDown() { 43 virtual void TearDown() {
44 // we must release the ContextGroup before we clear out the GL interface. 44 // we must release the ContextGroup before we clear out the GL interface.
45 // since its destructor uses GL. 45 // since its destructor uses GL.
46 group_->set_have_context(false); 46 group_->set_have_context(false);
47 group_ = NULL; 47 group_ = NULL;
48 ::gfx::GLInterface::SetGLInterface(NULL); 48 ::gfx::GLInterface::SetGLInterface(NULL);
49 gl_.reset(); 49 gl_.reset();
50 } 50 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_TRUE(group_->renderbuffer_manager() != NULL); 93 EXPECT_TRUE(group_->renderbuffer_manager() != NULL);
94 EXPECT_TRUE(group_->texture_manager() != NULL); 94 EXPECT_TRUE(group_->texture_manager() != NULL);
95 EXPECT_TRUE(group_->program_manager() != NULL); 95 EXPECT_TRUE(group_->program_manager() != NULL);
96 EXPECT_TRUE(group_->shader_manager() != NULL); 96 EXPECT_TRUE(group_->shader_manager() != NULL);
97 } 97 }
98 98
99 } // namespace gles2 99 } // namespace gles2
100 } // namespace gpu 100 } // namespace gpu
101 101
102 102
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698