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

Unified Diff: gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc

Issue 2094343003: CompressedCopyTextureCHROMIUM: validate texture targets before looking up levels (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
index 1ac777b1966bcf4ddc1d9ad6747ae831381f5115..c709a9394931568c88a17f72c784a0db2b7de874 100644
--- a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
+++ b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
@@ -275,6 +275,13 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, InvalidTextureIds) {
EXPECT_TRUE(glGetError() == GL_NO_ERROR);
}
+TEST_F(GLCompressedCopyTextureCHROMIUMTest, InvalidTextureTarget) {
+ glBindTexture(GL_TEXTURE_CUBE_MAP, textures_[0]);
+ glBindTexture(GL_TEXTURE_CUBE_MAP, textures_[1]);
+ glCompressedCopyTextureCHROMIUM(textures_[0], textures_[1]);
+ EXPECT_TRUE(glGetError() == GL_INVALID_VALUE);
+}
+
// Validate that some basic GL state is not touched upon execution of
// the extension.
TEST_F(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
« 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