diff options
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation_unittest_autogen.h')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation_unittest_autogen.h | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h index 7cf70eb..fef96d9 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h @@ -3119,4 +3119,136 @@ TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } +// TODO(zmo): Implement unit test for GenPathsCHROMIUM + +TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) { + struct Cmds { + cmds::DeletePathsCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, 2); + + gl_->DeletePathsCHROMIUM(1, 2); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) { + struct Cmds { + cmds::IsPathCHROMIUM cmd; + }; + + Cmds expected; + ExpectedMemoryInfo result1 = + GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result)); + expected.cmd.Init(1, result1.id, result1.offset); + + EXPECT_CALL(*command_buffer(), OnFlush()) + .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) + .RetiresOnSaturation(); + + GLboolean result = gl_->IsPathCHROMIUM(1); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); + EXPECT_TRUE(result); +} +// TODO(zmo): Implement unit test for PathCommandsCHROMIUM + +TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) { + struct Cmds { + cmds::PathParameterfCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); + + gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) { + struct Cmds { + cmds::PathParameteriCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); + + gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) { + struct Cmds { + cmds::PathStencilFuncCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(GL_NEVER, 2, 3); + + gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) { + struct Cmds { + cmds::StencilFillPathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_INVERT, 3); + + gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) { + struct Cmds { + cmds::StencilStrokePathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, 2, 3); + + gl_->StencilStrokePathCHROMIUM(1, 2, 3); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) { + struct Cmds { + cmds::CoverFillPathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); + + gl_->CoverFillPathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) { + struct Cmds { + cmds::CoverStrokePathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM); + + gl_->CoverStrokePathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) { + struct Cmds { + cmds::StencilThenCoverFillPathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, GL_INVERT, 3, GL_CONVEX_HULL_CHROMIUM); + + gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3, + GL_CONVEX_HULL_CHROMIUM); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} + +TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) { + struct Cmds { + cmds::StencilThenCoverStrokePathCHROMIUM cmd; + }; + Cmds expected; + expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); + + gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM); + EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); +} #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |