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

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

Issue 285703005: Return early after errors in glVertexAttribDivisor and glCopyTexImage2D implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index b5e680183af1b1532ab00545c64062517a053045..07e31cb367ea287f7df67d53a8cfe5307b0a9ea9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -974,6 +974,22 @@ TEST_P(GLES2DecoderWithShaderTest, DrawArraysInstancedANGLEFails) {
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
+TEST_P(GLES2DecoderWithShaderTest, VertexAttribDivisorANGLEFails) {
+ SetupTexture();
+ SetupVertexBuffer();
+ DoEnableVertexAttribArray(1);
+ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0);
+
+ EXPECT_CALL(*gl_, VertexAttribDivisorANGLE(_, _))
+ .Times(0)
+ .RetiresOnSaturation();
+
+ VertexAttribDivisorANGLE cmd;
+ cmd.Init(0, 1);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
+}
+
TEST_P(GLES2DecoderGeometryInstancingTest,
DrawArraysInstancedANGLENoAttributesFails) {
SetupTexture();

Powered by Google App Engine
This is Rietveld 408576698