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

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

Issue 1747013: Changes the code to use separate ids namspaces... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months 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 45605)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h (working copy)
@@ -42,8 +42,7 @@
cmd.Init(GL_ARRAY_BUFFER, kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
- EXPECT_TRUE(GetBufferInfo(kNewServiceId) != NULL);
+ EXPECT_TRUE(GetBufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, BindBufferInvalidArgs0_0) {
@@ -55,15 +54,6 @@
EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
}
-TEST_F(GLES2DecoderTest1, BindBufferInvalidArgs1_0) {
- EXPECT_CALL(*gl_, BindBuffer(_, _)).Times(0);
- SpecializedSetup<BindBuffer, 0>();
- BindBuffer cmd;
- cmd.Init(GL_ARRAY_BUFFER, client_texture_id_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
-}
-
TEST_F(GLES2DecoderTest1, BindFramebufferValidArgs) {
EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER, kServiceFramebufferId));
SpecializedSetup<BindFramebuffer, 0>();
@@ -82,8 +72,7 @@
cmd.Init(GL_FRAMEBUFFER, kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
- EXPECT_TRUE(GetFramebufferInfo(kNewServiceId) != NULL);
+ EXPECT_TRUE(GetFramebufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, BindFramebufferInvalidArgs0_0) {
@@ -95,15 +84,6 @@
EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
}
-TEST_F(GLES2DecoderTest1, BindFramebufferInvalidArgs1_0) {
- EXPECT_CALL(*gl_, BindFramebufferEXT(_, _)).Times(0);
- SpecializedSetup<BindFramebuffer, 0>();
- BindFramebuffer cmd;
- cmd.Init(GL_FRAMEBUFFER, client_texture_id_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
-}
-
TEST_F(GLES2DecoderTest1, BindRenderbufferValidArgs) {
EXPECT_CALL(
*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, kServiceRenderbufferId));
@@ -123,8 +103,7 @@
cmd.Init(GL_RENDERBUFFER, kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
- EXPECT_TRUE(GetRenderbufferInfo(kNewServiceId) != NULL);
+ EXPECT_TRUE(GetRenderbufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, BindRenderbufferInvalidArgs0_0) {
@@ -136,15 +115,6 @@
EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
}
-TEST_F(GLES2DecoderTest1, BindRenderbufferInvalidArgs1_0) {
- EXPECT_CALL(*gl_, BindRenderbufferEXT(_, _)).Times(0);
- SpecializedSetup<BindRenderbuffer, 0>();
- BindRenderbuffer cmd;
- cmd.Init(GL_RENDERBUFFER, client_texture_id_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
-}
-
TEST_F(GLES2DecoderTest1, BindTextureValidArgs) {
EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, kServiceTextureId));
SpecializedSetup<BindTexture, 0>();
@@ -163,8 +133,7 @@
cmd.Init(GL_TEXTURE_2D, kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
- EXPECT_TRUE(GetTextureInfo(kNewServiceId) != NULL);
+ EXPECT_TRUE(GetTextureInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, BindTextureInvalidArgs0_0) {
@@ -185,15 +154,6 @@
EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
}
-TEST_F(GLES2DecoderTest1, BindTextureInvalidArgs1_0) {
- EXPECT_CALL(*gl_, BindTexture(_, _)).Times(0);
- SpecializedSetup<BindTexture, 0>();
- BindTexture cmd;
- cmd.Init(GL_TEXTURE_2D, client_buffer_id_);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
-}
-
TEST_F(GLES2DecoderTest1, BlendColorValidArgs) {
EXPECT_CALL(*gl_, BlendColor(1, 2, 3, 4));
SpecializedSetup<BlendColor, 0>();
@@ -463,7 +423,7 @@
cmd.Init(kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetProgramInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, CreateShaderValidArgs) {
@@ -474,7 +434,7 @@
cmd.Init(GL_VERTEX_SHADER, kNewClientId);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetShaderInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, CreateShaderInvalidArgs0_0) {
@@ -506,12 +466,11 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetBufferInfo(client_buffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteBuffersInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteBuffersARB(1, Pointee(0)))
- .Times(1);
GetSharedMemoryAs<GLuint*>()[0] = kInvalidClientId;
SpecializedSetup<DeleteBuffers, 0>();
DeleteBuffers cmd;
@@ -530,12 +489,11 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(client_buffer_id_)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetBufferInfo(client_buffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteBuffersImmediateInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteBuffersARB(1, Pointee(0)))
- .Times(1);
DeleteBuffersImmediate& cmd = *GetImmediateAs<DeleteBuffersImmediate>();
SpecializedSetup<DeleteBuffersImmediate, 0>();
GLuint temp = kInvalidClientId;
@@ -555,12 +513,11 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetFramebufferInfo(client_framebuffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteFramebuffersInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(0)))
- .Times(1);
GetSharedMemoryAs<GLuint*>()[0] = kInvalidClientId;
SpecializedSetup<DeleteFramebuffers, 0>();
DeleteFramebuffers cmd;
@@ -580,12 +537,11 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(client_framebuffer_id_)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetFramebufferInfo(client_framebuffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteFramebuffersImmediateInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, Pointee(0)))
- .Times(1);
DeleteFramebuffersImmediate& cmd =
*GetImmediateAs<DeleteFramebuffersImmediate>();
SpecializedSetup<DeleteFramebuffersImmediate, 0>();
@@ -608,12 +564,11 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetRenderbufferInfo(client_renderbuffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteRenderbuffersInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, Pointee(0)))
- .Times(1);
GetSharedMemoryAs<GLuint*>()[0] = kInvalidClientId;
SpecializedSetup<DeleteRenderbuffers, 0>();
DeleteRenderbuffers cmd;
@@ -633,12 +588,11 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(client_renderbuffer_id_)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetRenderbufferInfo(client_renderbuffer_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteRenderbuffersImmediateInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, Pointee(0)))
- .Times(1);
DeleteRenderbuffersImmediate& cmd =
*GetImmediateAs<DeleteRenderbuffersImmediate>();
SpecializedSetup<DeleteRenderbuffersImmediate, 0>();
@@ -661,12 +615,11 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetTextureInfo(client_texture_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteTexturesInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(0)))
- .Times(1);
GetSharedMemoryAs<GLuint*>()[0] = kInvalidClientId;
SpecializedSetup<DeleteTextures, 0>();
DeleteTextures cmd;
@@ -685,12 +638,11 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(client_texture_id_)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), 0u);
+ EXPECT_TRUE(
+ GetTextureInfo(client_texture_id_) == NULL);
}
TEST_F(GLES2DecoderTest1, DeleteTexturesImmediateInvalidArgs) {
- EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(0)))
- .Times(1);
DeleteTexturesImmediate& cmd = *GetImmediateAs<DeleteTexturesImmediate>();
SpecializedSetup<DeleteTexturesImmediate, 0>();
GLuint temp = kInvalidClientId;
@@ -918,7 +870,7 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetBufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenBuffersInvalidArgs) {
@@ -940,7 +892,7 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetBufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenBuffersImmediateInvalidArgs) {
@@ -988,7 +940,7 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetFramebufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenFramebuffersInvalidArgs) {
@@ -1010,7 +962,7 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetFramebufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenFramebuffersImmediateInvalidArgs) {
@@ -1031,7 +983,7 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetRenderbufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenRenderbuffersInvalidArgs) {
@@ -1054,7 +1006,7 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetRenderbufferInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenRenderbuffersImmediateInvalidArgs) {
@@ -1076,7 +1028,7 @@
cmd.Init(1, shared_memory_id_, shared_memory_offset_);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetTextureInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenTexturesInvalidArgs) {
@@ -1098,7 +1050,7 @@
EXPECT_EQ(error::kNoError,
ExecuteImmediateCmd(cmd, sizeof(temp)));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
- EXPECT_EQ(GetServiceId(kNewClientId), kNewServiceId);
+ EXPECT_TRUE(GetTextureInfo(kNewClientId) != NULL);
}
TEST_F(GLES2DecoderTest1, GenTexturesImmediateInvalidArgs) {

Powered by Google App Engine
This is Rietveld 408576698