| 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/common/value_state.h" | 8 #include "gpu/command_buffer/common/value_state.h" |
| 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" |
| 10 #include "gpu/command_buffer/service/gpu_service_test.h" | 10 #include "gpu/command_buffer/service/gpu_service_test.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 public: | 34 public: |
| 35 static const bool kBindGeneratesResource = false; | 35 static const bool kBindGeneratesResource = false; |
| 36 | 36 |
| 37 ContextGroupTest() {} | 37 ContextGroupTest() {} |
| 38 | 38 |
| 39 protected: | 39 protected: |
| 40 void SetUp() override { | 40 void SetUp() override { |
| 41 GpuServiceTest::SetUp(); | 41 GpuServiceTest::SetUp(); |
| 42 decoder_.reset(new MockGLES2Decoder()); | 42 decoder_.reset(new MockGLES2Decoder()); |
| 43 group_ = scoped_refptr<ContextGroup>(new ContextGroup( | 43 group_ = scoped_refptr<ContextGroup>(new ContextGroup( |
| 44 NULL, NULL, NULL, NULL, NULL, NULL, kBindGeneratesResource)); | 44 NULL, NULL, NULL, NULL, NULL, NULL, NULL, kBindGeneratesResource)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 scoped_ptr<MockGLES2Decoder> decoder_; | 47 scoped_ptr<MockGLES2Decoder> decoder_; |
| 48 scoped_refptr<ContextGroup> group_; | 48 scoped_refptr<ContextGroup> group_; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 TEST_F(ContextGroupTest, Basic) { | 51 TEST_F(ContextGroupTest, Basic) { |
| 52 // Test it starts off uninitialized. | 52 // Test it starts off uninitialized. |
| 53 EXPECT_EQ(0u, group_->max_vertex_attribs()); | 53 EXPECT_EQ(0u, group_->max_vertex_attribs()); |
| 54 EXPECT_EQ(0u, group_->max_texture_units()); | 54 EXPECT_EQ(0u, group_->max_texture_units()); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); | 141 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); |
| 142 EXPECT_TRUE(group_->texture_manager() == NULL); | 142 EXPECT_TRUE(group_->texture_manager() == NULL); |
| 143 EXPECT_TRUE(group_->program_manager() == NULL); | 143 EXPECT_TRUE(group_->program_manager() == NULL); |
| 144 EXPECT_TRUE(group_->shader_manager() == NULL); | 144 EXPECT_TRUE(group_->shader_manager() == NULL); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace gles2 | 147 } // namespace gles2 |
| 148 } // namespace gpu | 148 } // namespace gpu |
| 149 | 149 |
| 150 | 150 |
| OLD | NEW |