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

Unified Diff: gpu/command_buffer/service/context_group_unittest.cc

Issue 1143393007: Teach GPU command buffer whether a context is webgl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/context_group_unittest.cc
diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc
index afd343d169de931df47805ecd11c474176780172..e527bd37038705fc07f409858d9d32717876a051 100644
--- a/gpu/command_buffer/service/context_group_unittest.cc
+++ b/gpu/command_buffer/service/context_group_unittest.cc
@@ -68,7 +68,8 @@ TEST_F(ContextGroupTest, Basic) {
TEST_F(ContextGroupTest, InitializeNoExtensions) {
TestHelper::SetupContextGroupInitExpectations(
gl_.get(), DisallowedFeatures(), "", "", kBindGeneratesResource);
- group_->Initialize(decoder_.get(), DisallowedFeatures());
+ group_->Initialize(
+ decoder_.get(), ContextGroup::kContextTypeOther, DisallowedFeatures());
EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs),
group_->max_vertex_attribs());
EXPECT_EQ(static_cast<uint32>(TestHelper::kNumTextureUnits),
@@ -103,8 +104,17 @@ TEST_F(ContextGroupTest, MultipleContexts) {
scoped_ptr<MockGLES2Decoder> decoder2_(new MockGLES2Decoder());
TestHelper::SetupContextGroupInitExpectations(
gl_.get(), DisallowedFeatures(), "", "", kBindGeneratesResource);
- group_->Initialize(decoder_.get(), DisallowedFeatures());
- group_->Initialize(decoder2_.get(), DisallowedFeatures());
+ EXPECT_TRUE(group_->Initialize(
+ decoder_.get(), ContextGroup::kContextTypeOther, DisallowedFeatures()));
+ EXPECT_FALSE(group_->Initialize(
+ decoder2_.get(), ContextGroup::kContextTypeWebGL1, DisallowedFeatures()));
+ EXPECT_FALSE(group_->Initialize(
+ decoder2_.get(), ContextGroup::kContextTypeWebGL2, DisallowedFeatures()));
+ EXPECT_FALSE(group_->Initialize(
+ decoder2_.get(), ContextGroup::kContextTypeUndefined,
+ DisallowedFeatures()));
+ EXPECT_TRUE(group_->Initialize(
+ decoder2_.get(), ContextGroup::kContextTypeOther, DisallowedFeatures()));
EXPECT_TRUE(group_->buffer_manager() != NULL);
EXPECT_TRUE(group_->framebuffer_manager() != NULL);

Powered by Google App Engine
This is Rietveld 408576698