Index: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h |
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h |
index 8069b124985d23833d34ac34c847f09a56ee344b..74a438c0f6b57e08220c442caf6b06af947c8e9d 100644 |
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h |
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h |
@@ -1800,6 +1800,108 @@ TEST_F(GLES2ImplementationTest, VertexAttribDivisorANGLE) { |
// TODO: Implement unit test for GenMailboxCHROMIUM |
// TODO: Implement unit test for BindUniformLocationCHROMIUM |
+TEST_F(GLES2ImplementationTest, GenValuebuffersCHROMIUM) { |
+ GLuint ids[2] = { |
+ 0, |
+ }; |
+ struct Cmds { |
+ cmds::GenValuebuffersCHROMIUMImmediate gen; |
+ GLuint data[2]; |
+ }; |
+ Cmds expected; |
+ expected.gen.Init(arraysize(ids), &ids[0]); |
+ expected.data[0] = kValuebuffersStartId; |
+ expected.data[1] = kValuebuffersStartId + 1; |
+ gl_->GenValuebuffersCHROMIUM(arraysize(ids), &ids[0]); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+ EXPECT_EQ(kValuebuffersStartId, ids[0]); |
+ EXPECT_EQ(kValuebuffersStartId + 1, ids[1]); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, DeleteValuebuffersCHROMIUM) { |
+ GLuint ids[2] = {kValuebuffersStartId, kValuebuffersStartId + 1}; |
+ struct Cmds { |
+ cmds::DeleteValuebuffersCHROMIUMImmediate del; |
+ GLuint data[2]; |
+ }; |
+ Cmds expected; |
+ expected.del.Init(arraysize(ids), &ids[0]); |
+ expected.data[0] = kValuebuffersStartId; |
+ expected.data[1] = kValuebuffersStartId + 1; |
+ gl_->DeleteValuebuffersCHROMIUM(arraysize(ids), &ids[0]); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, IsValuebufferCHROMIUM) { |
+ struct Cmds { |
+ cmds::IsValuebufferCHROMIUM cmd; |
+ }; |
+ |
+ Cmds expected; |
+ ExpectedMemoryInfo result1 = |
+ GetExpectedResultMemory(sizeof(cmds::IsValuebufferCHROMIUM::Result)); |
+ expected.cmd.Init(1, result1.id, result1.offset); |
+ |
+ EXPECT_CALL(*command_buffer(), OnFlush()) |
+ .WillOnce(SetMemory(result1.ptr, uint32_t(1))) |
+ .RetiresOnSaturation(); |
+ |
+ GLboolean result = gl_->IsValuebufferCHROMIUM(1); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+ EXPECT_TRUE(result); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, BindValuebufferCHROMIUM) { |
+ struct Cmds { |
+ cmds::BindValuebufferCHROMIUM cmd; |
+ }; |
+ Cmds expected; |
+ expected.cmd.Init(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, 2); |
+ |
+ gl_->BindValuebufferCHROMIUM(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, 2); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+ ClearCommands(); |
+ gl_->BindValuebufferCHROMIUM(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, 2); |
+ EXPECT_TRUE(NoCommandsWritten()); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, SubscribeValueCHROMIUM) { |
+ struct Cmds { |
+ cmds::SubscribeValueCHROMIUM cmd; |
+ }; |
+ Cmds expected; |
+ expected.cmd.Init(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, |
+ GL_MOUSE_POSITION_CHROMIUM); |
+ |
+ gl_->SubscribeValueCHROMIUM(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, |
+ GL_MOUSE_POSITION_CHROMIUM); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, PopulateSubscribedValuesCHROMIUM) { |
+ struct Cmds { |
+ cmds::PopulateSubscribedValuesCHROMIUM cmd; |
+ }; |
+ Cmds expected; |
+ expected.cmd.Init(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM); |
+ |
+ gl_->PopulateSubscribedValuesCHROMIUM(GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+} |
+ |
+TEST_F(GLES2ImplementationTest, UniformValuebufferCHROMIUM) { |
+ struct Cmds { |
+ cmds::UniformValuebufferCHROMIUM cmd; |
+ }; |
+ Cmds expected; |
+ expected.cmd.Init(1, GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, |
+ GL_MOUSE_POSITION_CHROMIUM); |
+ |
+ gl_->UniformValuebufferCHROMIUM(1, GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM, |
+ GL_MOUSE_POSITION_CHROMIUM); |
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
+} |
+ |
TEST_F(GLES2ImplementationTest, BindTexImage2DCHROMIUM) { |
struct Cmds { |
cmds::BindTexImage2DCHROMIUM cmd; |