Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
index 86481344fda2471d26da139c226ecaa69e85c748..d7579264e7ea60ce60a28533a50f631e7ecf00aa 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
@@ -200,11 +200,11 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine( |
// Context needs to be created before initializing ContextGroup, which will |
// in turn initialize FeatureInfo, which needs a context to determine |
// extension support. |
- context_ = new gfx::GLContextStubWithExtensions; |
+ context_ = new StrictMock<GLContextMock>(); |
context_->AddExtensionsString(normalized_init.extensions.c_str()); |
context_->SetGLVersionString(normalized_init.gl_version.c_str()); |
- context_->MakeCurrent(surface_.get()); |
+ context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); |
gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_.get()); |
TestHelper::SetupContextGroupInitExpectations( |
@@ -401,6 +401,11 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine( |
surface_->GetSize(), |
DisallowedFeatures(), |
attribs); |
+ EXPECT_CALL(*context_, MakeCurrent(surface_.get())).WillOnce(Return(true)); |
+ if (context_->WasAllocatedUsingRobustnessExtension()) { |
+ EXPECT_CALL(*gl_, GetGraphicsResetStatusARB()) |
+ .WillOnce(Return(GL_NO_ERROR)); |
+ } |
decoder_->MakeCurrent(); |
decoder_->set_engine(engine_.get()); |
decoder_->BeginDecoding(); |