| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "gpu/command_buffer/common/value_state.h" | |
| 12 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" | 11 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" |
| 13 #include "gpu/command_buffer/service/gpu_service_test.h" | 12 #include "gpu/command_buffer/service/gpu_service_test.h" |
| 14 #include "gpu/command_buffer/service/mailbox_manager.h" | 13 #include "gpu/command_buffer/service/mailbox_manager.h" |
| 15 #include "gpu/command_buffer/service/test_helper.h" | 14 #include "gpu/command_buffer/service/test_helper.h" |
| 16 #include "gpu/command_buffer/service/texture_manager.h" | 15 #include "gpu/command_buffer/service/texture_manager.h" |
| 17 #include "gpu/command_buffer/service/valuebuffer_manager.h" | |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "ui/gl/gl_mock.h" | 17 #include "ui/gl/gl_mock.h" |
| 20 | 18 |
| 21 using ::testing::_; | 19 using ::testing::_; |
| 22 using ::testing::DoAll; | 20 using ::testing::DoAll; |
| 23 using ::testing::HasSubstr; | 21 using ::testing::HasSubstr; |
| 24 using ::testing::InSequence; | 22 using ::testing::InSequence; |
| 25 using ::testing::MatcherCast; | 23 using ::testing::MatcherCast; |
| 26 using ::testing::Not; | 24 using ::testing::Not; |
| 27 using ::testing::Pointee; | 25 using ::testing::Pointee; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 | 37 |
| 40 ContextGroupTest() {} | 38 ContextGroupTest() {} |
| 41 | 39 |
| 42 protected: | 40 protected: |
| 43 void SetUp() override { | 41 void SetUp() override { |
| 44 GpuServiceTest::SetUp(); | 42 GpuServiceTest::SetUp(); |
| 45 decoder_.reset(new MockGLES2Decoder()); | 43 decoder_.reset(new MockGLES2Decoder()); |
| 46 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo; | 44 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo; |
| 47 group_ = scoped_refptr<ContextGroup>( | 45 group_ = scoped_refptr<ContextGroup>( |
| 48 new ContextGroup(gpu_preferences_, NULL, NULL, NULL, NULL, feature_info, | 46 new ContextGroup(gpu_preferences_, NULL, NULL, NULL, NULL, feature_info, |
| 49 NULL, NULL, kBindGeneratesResource)); | 47 kBindGeneratesResource)); |
| 50 } | 48 } |
| 51 | 49 |
| 52 GpuPreferences gpu_preferences_; | 50 GpuPreferences gpu_preferences_; |
| 53 std::unique_ptr<MockGLES2Decoder> decoder_; | 51 std::unique_ptr<MockGLES2Decoder> decoder_; |
| 54 scoped_refptr<ContextGroup> group_; | 52 scoped_refptr<ContextGroup> group_; |
| 55 }; | 53 }; |
| 56 | 54 |
| 57 TEST_F(ContextGroupTest, Basic) { | 55 TEST_F(ContextGroupTest, Basic) { |
| 58 // Test it starts off uninitialized. | 56 // Test it starts off uninitialized. |
| 59 EXPECT_EQ(0u, group_->max_vertex_attribs()); | 57 EXPECT_EQ(0u, group_->max_vertex_attribs()); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); | 142 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); |
| 145 EXPECT_TRUE(group_->texture_manager() == NULL); | 143 EXPECT_TRUE(group_->texture_manager() == NULL); |
| 146 EXPECT_TRUE(group_->program_manager() == NULL); | 144 EXPECT_TRUE(group_->program_manager() == NULL); |
| 147 EXPECT_TRUE(group_->shader_manager() == NULL); | 145 EXPECT_TRUE(group_->shader_manager() == NULL); |
| 148 } | 146 } |
| 149 | 147 |
| 150 } // namespace gles2 | 148 } // namespace gles2 |
| 151 } // namespace gpu | 149 } // namespace gpu |
| 152 | 150 |
| 153 | 151 |
| OLD | NEW |