Index: gpu/command_buffer/tests/gl_texture_storage_unittest.cc |
diff --git a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc |
index f5d9a6141354c282673f9af4a0f015d4cfad8e51..7803bfba23087d44624bd9603fa4258ae9319c89 100644 |
--- a/gpu/command_buffer/tests/gl_texture_storage_unittest.cc |
+++ b/gpu/command_buffer/tests/gl_texture_storage_unittest.cc |
@@ -156,6 +156,17 @@ TEST_F(TextureStorageTest, CannotRedefine) { |
EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); |
} |
+TEST_F(TextureStorageTest, InternalFormatBleedingToTexImage) { |
+ if (!extension_available_) |
+ return; |
+ |
+ EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); |
+ // The context is ES2 context. |
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8_OES, 4, 4, 0, GL_RGBA, |
+ GL_UNSIGNED_BYTE, nullptr); |
+ EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError()); |
+} |
+ |
} // namespace gpu |