Index: gpu/command_buffer/client/gles2_implementation_unittest.cc |
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc |
index 2acbc6356399a37b7ac65b97a4f2a95461dddfeb..98c1497d1a9e96cac3cdde33213d732e2be5ec78 100644 |
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc |
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc |
@@ -3367,6 +3367,13 @@ TEST_F(GLES2ImplementationTest, CreateAndConsumeTextureCHROMIUM) { |
EXPECT_EQ(kTexturesStartId, id); |
} |
+TEST_F(GLES2ImplementationTest, FailCreateImageCHROMIUMOnEmptyBuffers) { |
reveman
2015/03/02 20:09:56
Do we need an error for this? We used to crash if
|
+ EXPECT_CALL(*command_buffer(), OnFlush()).Times(1).RetiresOnSaturation(); |
+ GLuint image_id = gl_->CreateImageCHROMIUM(nullptr, 10, 10, GL_RGBA); |
+ EXPECT_EQ(0u, image_id); |
+ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), gl_->GetError()); |
+} |
+ |
TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) { |
struct Cmds { |
cmds::ProduceTextureCHROMIUMImmediate cmd; |