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/service/gles2_cmd_decoder_mock.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" |
9 #include "gpu/command_buffer/service/gpu_service_test.h" | 10 #include "gpu/command_buffer/service/gpu_service_test.h" |
10 #include "gpu/command_buffer/service/mailbox_manager.h" | 11 #include "gpu/command_buffer/service/mailbox_manager.h" |
11 #include "gpu/command_buffer/service/test_helper.h" | 12 #include "gpu/command_buffer/service/test_helper.h" |
12 #include "gpu/command_buffer/service/texture_manager.h" | 13 #include "gpu/command_buffer/service/texture_manager.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/gl/gl_mock.h" | 15 #include "ui/gl/gl_mock.h" |
15 | 16 |
16 using ::testing::_; | 17 using ::testing::_; |
17 using ::testing::DoAll; | 18 using ::testing::DoAll; |
(...skipping 14 matching lines...) Expand all Loading... |
32 public: | 33 public: |
33 static const bool kBindGeneratesResource = false; | 34 static const bool kBindGeneratesResource = false; |
34 | 35 |
35 ContextGroupTest() {} | 36 ContextGroupTest() {} |
36 | 37 |
37 protected: | 38 protected: |
38 void SetUp() override { | 39 void SetUp() override { |
39 GpuServiceTest::SetUp(); | 40 GpuServiceTest::SetUp(); |
40 decoder_.reset(new MockGLES2Decoder()); | 41 decoder_.reset(new MockGLES2Decoder()); |
41 group_ = scoped_refptr<ContextGroup>( | 42 group_ = scoped_refptr<ContextGroup>( |
42 new ContextGroup(NULL, NULL, NULL, NULL, kBindGeneratesResource)); | 43 new ContextGroup(NULL, NULL, NULL, NULL, NULL, kBindGeneratesResource)); |
43 } | 44 } |
44 | 45 |
45 scoped_ptr<MockGLES2Decoder> decoder_; | 46 scoped_ptr<MockGLES2Decoder> decoder_; |
46 scoped_refptr<ContextGroup> group_; | 47 scoped_refptr<ContextGroup> group_; |
47 }; | 48 }; |
48 | 49 |
49 TEST_F(ContextGroupTest, Basic) { | 50 TEST_F(ContextGroupTest, Basic) { |
50 // Test it starts off uninitialized. | 51 // Test it starts off uninitialized. |
51 EXPECT_EQ(0u, group_->max_vertex_attribs()); | 52 EXPECT_EQ(0u, group_->max_vertex_attribs()); |
52 EXPECT_EQ(0u, group_->max_texture_units()); | 53 EXPECT_EQ(0u, group_->max_texture_units()); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); | 128 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); |
128 EXPECT_TRUE(group_->texture_manager() == NULL); | 129 EXPECT_TRUE(group_->texture_manager() == NULL); |
129 EXPECT_TRUE(group_->program_manager() == NULL); | 130 EXPECT_TRUE(group_->program_manager() == NULL); |
130 EXPECT_TRUE(group_->shader_manager() == NULL); | 131 EXPECT_TRUE(group_->shader_manager() == NULL); |
131 } | 132 } |
132 | 133 |
133 } // namespace gles2 | 134 } // namespace gles2 |
134 } // namespace gpu | 135 } // namespace gpu |
135 | 136 |
136 | 137 |
OLD | NEW |