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

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

Issue 5676003: Make shader and program object lifetimes match OpenGL ES spec.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc (revision 68425)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc (working copy)
@@ -172,14 +172,14 @@
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
-TEST_F(GLES2DecoderWithShaderTest,
- DrawArraysDeletedProgramSucceedsWithoutGLCall) {
- SetupVertexBuffer();
- DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0);
+TEST_F(GLES2DecoderWithShaderTest, DrawArraysDeletedProgramSucceeds) {
+ SetupTexture();
+ AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
DoDeleteProgram(client_program_id_, kServiceProgramId);
EXPECT_CALL(*gl_, DrawArrays(_, _, _))
- .Times(0);
+ .Times(1)
+ .RetiresOnSaturation();
DrawArrays cmd;
cmd.Init(GL_TRIANGLES, 0, kNumVertices);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
@@ -330,14 +330,14 @@
EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
}
-TEST_F(GLES2DecoderWithShaderTest, DrawElementsDeletedProgramSucceedsNoGLCall) {
- SetupVertexBuffer();
+TEST_F(GLES2DecoderWithShaderTest, DrawElementsDeletedProgramSucceeds) {
+ SetupTexture();
SetupIndexBuffer();
- DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0);
+ AddExpectationsForSimulatedAttrib0(kMaxValidIndex + 1, 0);
DoDeleteProgram(client_program_id_, kServiceProgramId);
EXPECT_CALL(*gl_, DrawElements(_, _, _, _))
- .Times(0);
+ .Times(1);
DrawElements cmd;
cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT,
kValidIndexRangeStart * 2);
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698