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

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

Issue 303543005: Fix a bug in gpu_unittests mock expectations for VAO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec98832aae5096f254a3abe8fa156061b9c75933..0402e32bc4bd683522059582be54aa192b252a26 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -69,7 +69,9 @@ GLES2DecoderTestBase::~GLES2DecoderTestBase() {}
void GLES2DecoderTestBase::SetUp() {
InitState init;
- init.gl_version = "3.0";
+ // By default, test with VAO support.
+ init.extensions = "GL_OES_vertex_array_object";
vmiura 2014/05/27 18:18:08 Many of the tests override this SetUp(). Could we
Zhenyao Mo 2014/05/27 21:22:49 Done.
+ init.gl_version = "opengl es 2.0";
Ken Russell (switch to Gerrit) 2014/05/27 18:24:32 Is the change of the assumed GL_VERSION in the tes
init.has_alpha = true;
init.has_depth = true;
init.request_alpha = true;
@@ -156,7 +158,9 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine(
group_->Initialize(mock_decoder_.get(), DisallowedFeatures()));
if (group_->feature_info()->feature_flags().native_vertex_array_object) {
- EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)).Times(1).RetiresOnSaturation();
+ EXPECT_CALL(*gl_, GenVertexArraysOES(1, _))
+ .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId))
+ .RetiresOnSaturation();
EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation();
}
@@ -365,6 +369,12 @@ void GLES2DecoderTestBase::ResetDecoder() {
.Times(2)
.RetiresOnSaturation();
+ if (group_->feature_info()->feature_flags().native_vertex_array_object) {
+ EXPECT_CALL(*gl_, DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId)))
+ .Times(1)
+ .RetiresOnSaturation();
+ }
+
decoder_->EndDecoding();
decoder_->Destroy(true);
decoder_.reset();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698