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

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

Issue 23660006: FeatureInfo: Remove allowed_extensions and init workarounds early (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android_webview build Created 7 years, 3 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
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 EXPECT_TRUE(group_->framebuffer_manager() == NULL); 65 EXPECT_TRUE(group_->framebuffer_manager() == NULL);
66 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); 66 EXPECT_TRUE(group_->renderbuffer_manager() == NULL);
67 EXPECT_TRUE(group_->texture_manager() == NULL); 67 EXPECT_TRUE(group_->texture_manager() == NULL);
68 EXPECT_TRUE(group_->program_manager() == NULL); 68 EXPECT_TRUE(group_->program_manager() == NULL);
69 EXPECT_TRUE(group_->shader_manager() == NULL); 69 EXPECT_TRUE(group_->shader_manager() == NULL);
70 } 70 }
71 71
72 TEST_F(ContextGroupTest, InitializeNoExtensions) { 72 TEST_F(ContextGroupTest, InitializeNoExtensions) {
73 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 73 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
74 DisallowedFeatures(), ""); 74 DisallowedFeatures(), "");
75 group_->Initialize(decoder_.get(), DisallowedFeatures(), ""); 75 group_->Initialize(decoder_.get(), DisallowedFeatures());
76 EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs), 76 EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs),
77 group_->max_vertex_attribs()); 77 group_->max_vertex_attribs());
78 EXPECT_EQ(static_cast<uint32>(TestHelper::kNumTextureUnits), 78 EXPECT_EQ(static_cast<uint32>(TestHelper::kNumTextureUnits),
79 group_->max_texture_units()); 79 group_->max_texture_units());
80 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxTextureImageUnits), 80 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxTextureImageUnits),
81 group_->max_texture_image_units()); 81 group_->max_texture_image_units());
82 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxVertexTextureImageUnits), 82 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxVertexTextureImageUnits),
83 group_->max_vertex_texture_image_units()); 83 group_->max_vertex_texture_image_units());
84 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxFragmentUniformVectors), 84 EXPECT_EQ(static_cast<uint32>(TestHelper::kMaxFragmentUniformVectors),
85 group_->max_fragment_uniform_vectors()); 85 group_->max_fragment_uniform_vectors());
(...skipping 14 matching lines...) Expand all
100 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); 100 EXPECT_TRUE(group_->renderbuffer_manager() == NULL);
101 EXPECT_TRUE(group_->texture_manager() == NULL); 101 EXPECT_TRUE(group_->texture_manager() == NULL);
102 EXPECT_TRUE(group_->program_manager() == NULL); 102 EXPECT_TRUE(group_->program_manager() == NULL);
103 EXPECT_TRUE(group_->shader_manager() == NULL); 103 EXPECT_TRUE(group_->shader_manager() == NULL);
104 } 104 }
105 105
106 TEST_F(ContextGroupTest, MultipleContexts) { 106 TEST_F(ContextGroupTest, MultipleContexts) {
107 scoped_ptr<MockGLES2Decoder> decoder2_(new MockGLES2Decoder()); 107 scoped_ptr<MockGLES2Decoder> decoder2_(new MockGLES2Decoder());
108 TestHelper::SetupContextGroupInitExpectations(gl_.get(), 108 TestHelper::SetupContextGroupInitExpectations(gl_.get(),
109 DisallowedFeatures(), ""); 109 DisallowedFeatures(), "");
110 group_->Initialize(decoder_.get(), DisallowedFeatures(), ""); 110 group_->Initialize(decoder_.get(), DisallowedFeatures());
111 group_->Initialize(decoder2_.get(), DisallowedFeatures(), ""); 111 group_->Initialize(decoder2_.get(), DisallowedFeatures());
112 112
113 EXPECT_TRUE(group_->buffer_manager() != NULL); 113 EXPECT_TRUE(group_->buffer_manager() != NULL);
114 EXPECT_TRUE(group_->framebuffer_manager() != NULL); 114 EXPECT_TRUE(group_->framebuffer_manager() != NULL);
115 EXPECT_TRUE(group_->renderbuffer_manager() != NULL); 115 EXPECT_TRUE(group_->renderbuffer_manager() != NULL);
116 EXPECT_TRUE(group_->texture_manager() != NULL); 116 EXPECT_TRUE(group_->texture_manager() != NULL);
117 EXPECT_TRUE(group_->program_manager() != NULL); 117 EXPECT_TRUE(group_->program_manager() != NULL);
118 EXPECT_TRUE(group_->shader_manager() != NULL); 118 EXPECT_TRUE(group_->shader_manager() != NULL);
119 119
120 group_->Destroy(decoder_.get(), false); 120 group_->Destroy(decoder_.get(), false);
121 121
(...skipping 11 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698