| 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 "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 21 matching lines...) Expand all Loading... |
| 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_ = scoped_refptr<ContextGroup>( | 41 group_ = scoped_refptr<ContextGroup>( |
| 42 new ContextGroup(NULL, NULL, NULL, NULL, true)); | 42 new ContextGroup(NULL, NULL, NULL, true)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual void TearDown() { | 45 virtual void TearDown() { |
| 46 ::gfx::GLInterface::SetGLInterface(NULL); | 46 ::gfx::GLInterface::SetGLInterface(NULL); |
| 47 gl_.reset(); | 47 gl_.reset(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; | 50 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; |
| 51 scoped_ptr<MockGLES2Decoder> decoder_; | 51 scoped_ptr<MockGLES2Decoder> decoder_; |
| 52 scoped_refptr<ContextGroup> group_; | 52 scoped_refptr<ContextGroup> group_; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); | 133 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); |
| 134 EXPECT_TRUE(group_->texture_manager() == NULL); | 134 EXPECT_TRUE(group_->texture_manager() == NULL); |
| 135 EXPECT_TRUE(group_->program_manager() == NULL); | 135 EXPECT_TRUE(group_->program_manager() == NULL); |
| 136 EXPECT_TRUE(group_->shader_manager() == NULL); | 136 EXPECT_TRUE(group_->shader_manager() == NULL); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace gles2 | 139 } // namespace gles2 |
| 140 } // namespace gpu | 140 } // namespace gpu |
| 141 | 141 |
| 142 | 142 |
| OLD | NEW |