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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h

Issue 5626008: Exposed support for dynamically enabling extensions in command buffer... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h (revision 68245)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h (working copy)
@@ -1755,5 +1755,47 @@
// TODO(gman): GetUniformLocationBucket
+
+TEST_F(GLES2DecoderTest1, GetVertexAttribfvValidArgs) {
+ SpecializedSetup<GetVertexAttribfv, 0>(true);
+ typedef GetVertexAttribfv::Result Result;
+ Result* result = static_cast<Result*>(shared_memory_address_);
+ result->size = 0;
+ GetVertexAttribfv cmd;
+ cmd.Init(
+ 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_,
+ shared_memory_offset_);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(
+ GL_VERTEX_ATTRIB_ARRAY_NORMALIZED),
+ result->GetNumResults());
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_F(GLES2DecoderTest1, GetVertexAttribfvInvalidArgs2_0) {
+ EXPECT_CALL(*gl_, GetVertexAttribfv(_, _, _)).Times(0);
+ SpecializedSetup<GetVertexAttribfv, 0>(false);
+ GetVertexAttribfv::Result* result =
+ static_cast<GetVertexAttribfv::Result*>(shared_memory_address_);
+ result->size = 0;
+ GetVertexAttribfv cmd;
+ cmd.Init(1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, kInvalidSharedMemoryId, 0);
+ EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
+ EXPECT_EQ(0u, result->size);
+}
+
+TEST_F(GLES2DecoderTest1, GetVertexAttribfvInvalidArgs2_1) {
+ EXPECT_CALL(*gl_, GetVertexAttribfv(_, _, _)).Times(0);
+ SpecializedSetup<GetVertexAttribfv, 0>(false);
+ GetVertexAttribfv::Result* result =
+ static_cast<GetVertexAttribfv::Result*>(shared_memory_address_);
+ result->size = 0;
+ GetVertexAttribfv cmd;
+ cmd.Init(
+ 1, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, shared_memory_id_,
+ kInvalidSharedMemoryOffset);
+ EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
+ EXPECT_EQ(0u, result->size);
+}
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_1.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698