OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "gpu/command_buffer/tests/gl_manager.h" | 9 #include "gpu/command_buffer/tests/gl_manager.h" |
10 #include "gpu/command_buffer/tests/gl_test_utils.h" | 10 #include "gpu/command_buffer/tests/gl_test_utils.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 0, | 149 0, |
150 GL_RGBA, | 150 GL_RGBA, |
151 4, 4, | 151 4, 4, |
152 0, | 152 0, |
153 GL_RGBA, | 153 GL_RGBA, |
154 GL_UNSIGNED_BYTE, | 154 GL_UNSIGNED_BYTE, |
155 NULL); | 155 NULL); |
156 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); | 156 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), glGetError()); |
157 } | 157 } |
158 | 158 |
159 TEST_F(TextureStorageTest, InternalFormatBleedingToTexImage) { | |
160 if (!extension_available_) | |
161 return; | |
162 | |
163 EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); | |
164 // The context is ES2 context. | |
165 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8_OES, 4, 4, 0, GL_RGBA, | |
166 GL_UNSIGNED_BYTE, nullptr); | |
167 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_VALUE), glGetError()); | |
168 } | |
169 | |
170 } // namespace gpu | 159 } // namespace gpu |
171 | 160 |
172 | 161 |
173 | 162 |
OLD | NEW |