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

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

Issue 2461023002: command buffer: audit validation of ES3 commands (part 2) (Closed)
Patch Set: update mocked unittests Created 4 years, 2 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 | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | 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_programs.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
index d6563d5f3d366e4e6a2db6ddfe55fde743285240..e7078d8f712999e2e198234db654054dcab9df0c 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -889,10 +889,6 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivSucceeds) {
kPname[ii],
shared_memory_id_,
shared_memory_offset_);
- EXPECT_CALL(*gl_, GetError())
- .WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_NO_ERROR))
- .RetiresOnSaturation();
EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
.WillOnce(SetArgPointee<2>(GL_TRUE))
.RetiresOnSaturation();
@@ -931,8 +927,6 @@ TEST_P(GLES3DecoderWithShaderTest,
shared_memory_offset_);
EXPECT_CALL(*gl_, GetError())
.WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_NO_ERROR))
.RetiresOnSaturation();
EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
.WillOnce(SetArgPointee<2>(GL_TRUE))
@@ -984,9 +978,6 @@ TEST_P(GLES3DecoderWithShaderTest,
EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
.WillOnce(SetArgPointee<2>(GL_TRUE))
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, GetError())
- .WillOnce(Return(GL_NO_ERROR))
- .RetiresOnSaturation();
EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
}
@@ -1012,10 +1003,6 @@ TEST_P(GLES3DecoderWithShaderTest,
.WillOnce(SetArgPointee<2>(GL_TRUE))
.WillOnce(SetArgPointee<2>(GL_TRUE))
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, GetError())
- .WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_NO_ERROR))
- .RetiresOnSaturation();
cmd.Init(client_program_id_,
0,
GL_UNIFORM_BLOCK_BINDING,
@@ -1298,10 +1285,6 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivSucceeds) {
EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
.WillOnce(SetArgPointee<2>(GL_TRUE))
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, GetError())
- .WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_NO_ERROR))
- .RetiresOnSaturation();
result->size = 0;
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(kCount, static_cast<size_t>(result->GetNumResults()));
@@ -1346,8 +1329,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadProgramFails) {
TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadParamsFails) {
const uint32_t kBucketId = 123;
- const GLuint kIndices[] = { 1, 2 };
- const GLint kResults[] = { 1976, 321 };
+ const GLuint kIndices[] = { 1, 100 };
const size_t kCount = arraysize(kIndices);
SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount);
GetActiveUniformsiv::Result* result =
@@ -1358,18 +1340,6 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadParamsFails) {
GL_UNIFORM_TYPE,
kSharedMemoryId,
kSharedMemoryOffset);
- EXPECT_CALL(*gl_,
- GetActiveUniformsiv(
- kServiceProgramId, kCount, _, GL_UNIFORM_TYPE, _))
- .WillOnce(SetArrayArgument<4>(kResults, kResults + kCount))
- .RetiresOnSaturation();
- EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _))
- .WillOnce(SetArgPointee<2>(GL_TRUE))
- .RetiresOnSaturation();
- EXPECT_CALL(*gl_, GetError())
- .WillOnce(Return(GL_NO_ERROR))
- .WillOnce(Return(GL_INVALID_VALUE))
- .RetiresOnSaturation();
result->size = 0;
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(0, result->GetNumResults());
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698