summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartina.kollarova <martina.kollarova@intel.com>2015-11-12 01:20:02 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-12 09:21:05 +0000
commitb1e4eebb9b7e29e06c1dd0270c4b338325e6deae (patch)
tree0e80c214a2606d28c89e59a8d8562ca96bbb34b3
parent9103aa9cfe2a9dc293863da66f16ba70ad625595 (diff)
downloadchromium_src-b1e4eebb9b7e29e06c1dd0270c4b338325e6deae.zip
chromium_src-b1e4eebb9b7e29e06c1dd0270c4b338325e6deae.tar.gz
chromium_src-b1e4eebb9b7e29e06c1dd0270c4b338325e6deae.tar.bz2
Enable unit tests for SwapBuffers and SwapInterval
BUG=None TEST=gpu_unittests Review URL: https://codereview.chromium.org/1409993015 Cr-Commit-Position: refs/heads/master@{#359294}
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py4
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h16
2 files changed, 18 insertions, 2 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 57719c6..64cde4d 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -3413,16 +3413,16 @@ _FUNCTION_INFO = {
'SwapBuffers': {
'impl_func': False,
'decoder_func': 'DoSwapBuffers',
- 'unit_test': False,
'client_test': False,
+ 'expectation': False,
'extension': True,
'trace_level': 1,
},
'SwapInterval': {
'impl_func': False,
'decoder_func': 'DoSwapInterval',
- 'unit_test': False,
'client_test': False,
+ 'expectation': False,
'extension': True,
'trace_level': 1,
},
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
index 8c7fae8..e8b9eb6 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
@@ -368,6 +368,14 @@ TEST_P(GLES2DecoderTest3, PopGroupMarkerEXTValidArgs) {
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
+TEST_P(GLES2DecoderTest3, SwapBuffersValidArgs) {
+ SpecializedSetup<cmds::SwapBuffers, 0>(true);
+ cmds::SwapBuffers cmd;
+ cmd.Init();
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
TEST_P(GLES2DecoderTest3, IsValuebufferCHROMIUMValidArgs) {
SpecializedSetup<cmds::IsValuebufferCHROMIUM, 0>(true);
cmds::IsValuebufferCHROMIUM cmd;
@@ -386,4 +394,12 @@ TEST_P(GLES2DecoderTest3, IsValuebufferCHROMIUMInvalidArgsBadSharedMemoryId) {
kInvalidSharedMemoryOffset);
EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
}
+
+TEST_P(GLES2DecoderTest3, SwapIntervalValidArgs) {
+ SpecializedSetup<cmds::SwapInterval, 0>(true);
+ cmds::SwapInterval cmd;
+ cmd.Init(1);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_