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

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

Issue 13543007: GLImage support for Android zero-copy pixel buffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add expectations to the unittests for GetErrors() coming from the suppressor Created 7 years, 8 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') | ui/gfx/native_widget_types.h » ('j') | 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 42f0fc5f8a5b7391e7368cf89b6f3ae1d9659638..82e18bf6d2765a375ac42c65cc5ee97911a0bc1a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -7913,6 +7913,11 @@ TEST_F(GLES2DecoderTest, BindTexImage2DCHROMIUM) {
EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL);
// Bind image to texture.
+ // ScopedGLErrorSuppressor calls GetError on its constructor and destructor.
+ EXPECT_CALL(*gl_, GetError())
+ .Times(2)
+ .WillOnce(Return(GL_NO_ERROR))
no sievers 2013/04/08 20:02:52 EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_
+ .RetiresOnSaturation();
BindTexImage2DCHROMIUM bind_tex_image_2d_cmd;
bind_tex_image_2d_cmd.Init(GL_TEXTURE_2D, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd));
@@ -7952,6 +7957,11 @@ TEST_F(GLES2DecoderTest, ReleaseTexImage2DCHROMIUM) {
EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL);
// Bind image to texture.
+ // ScopedGLErrorSuppressor calls GetError on its constructor and destructor.
+ EXPECT_CALL(*gl_, GetError())
+ .Times(2)
+ .WillOnce(Return(GL_NO_ERROR))
+ .RetiresOnSaturation();
BindTexImage2DCHROMIUM bind_tex_image_2d_cmd;
bind_tex_image_2d_cmd.Init(GL_TEXTURE_2D, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd));
@@ -7960,6 +7970,11 @@ TEST_F(GLES2DecoderTest, ReleaseTexImage2DCHROMIUM) {
EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL);
// Release image from texture.
+ // ScopedGLErrorSuppressor calls GetError on its constructor and destructor.
+ EXPECT_CALL(*gl_, GetError())
+ .Times(2)
+ .WillOnce(Return(GL_NO_ERROR))
+ .RetiresOnSaturation();
ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd;
release_tex_image_2d_cmd.Init(GL_TEXTURE_2D, 1);
EXPECT_EQ(error::kNoError, ExecuteCmd(release_tex_image_2d_cmd));
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698