| Index: gpu/command_buffer/build_gles2_cmd_buffer.py
|
| diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
|
| index fbaa67dabda15e078a628e01d28bd99b676bea0a..a652c6347cdd597d0c04db4cdadccd8374897813 100755
|
| --- a/gpu/command_buffer/build_gles2_cmd_buffer.py
|
| +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
|
| @@ -451,6 +451,7 @@ _ENUM_LISTS = {
|
| 'valid': [
|
| 'GL_ANY_SAMPLES_PASSED_EXT',
|
| 'GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT',
|
| + 'GL_COMMANDS_ISSUED_CHROMIUM',
|
| ],
|
| },
|
| 'RenderBufferParameter': {
|
| @@ -795,6 +796,7 @@ _PEPPER_INTERFACES = [
|
| # valid_args: A dictionary of argument indices to args to use in unit tests
|
| # when they can not be automatically determined.
|
| # pepper_interface: The pepper interface that is used for this extension
|
| +# invalid_test: False if no invalid test needed.
|
|
|
| _FUNCTION_INFO = {
|
| 'ActiveTexture': {
|
| @@ -1594,12 +1596,16 @@ _FUNCTION_INFO = {
|
| 'gl_test_func': 'glGenQueriesARB',
|
| 'resource_type': 'Query',
|
| 'resource_types': 'Queries',
|
| + 'expectation': False,
|
| + 'get_test': False,
|
| + 'invalid_test': False,
|
| },
|
| 'DeleteQueriesEXT': {
|
| 'type': 'DELn',
|
| 'gl_test_func': 'glDeleteQueriesARB',
|
| 'resource_type': 'Query',
|
| 'resource_types': 'Queries',
|
| + 'expectation': False,
|
| },
|
| 'IsQueryEXT': {
|
| 'gen_cmd': False,
|
| @@ -2794,13 +2800,19 @@ TEST_F(%(test_name)s, %(name)sValidArgs) {
|
| cmd.Init(%(args)s);
|
| EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
|
| EXPECT_EQ(GL_NO_ERROR, GetGLError());
|
| - EXPECT_TRUE(Get%(resource_name)sInfo(kNewClientId) != NULL);
|
| + GetTest
|
| }
|
| """
|
| - self.WriteValidUnitTest(func, file, valid_test, {
|
| + get_test = ""
|
| + if func.GetInfo("get_test") or func.GetInfo("get_test") == None:
|
| + get_test = ("EXPECT_TRUE(Get%sInfo(kNewClientId) != NULL);" %
|
| + func.GetInfo('resource_type'))
|
| + valid_test = valid_test.replace('GetTest', get_test);
|
| + self.WriteValidUnitTest(func, file, valid_test, {
|
| 'resource_name': func.GetInfo('resource_type'),
|
| })
|
| - invalid_test = """
|
| + if func.GetInfo('invalid_test') or func.GetInfo('invalid_test') == None:
|
| + invalid_test = """
|
| TEST_F(%(test_name)s, %(name)sInvalidArgs) {
|
| EXPECT_CALL(*gl_, %(gl_func_name)s(_, _)).Times(0);
|
| GetSharedMemoryAs<GLuint*>()[0] = client_%(resource_name)s_id_;
|
| @@ -2810,9 +2822,9 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs) {
|
| EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd));
|
| }
|
| """
|
| - self.WriteValidUnitTest(func, file, invalid_test, {
|
| - 'resource_name': func.GetInfo('resource_type').lower(),
|
| - })
|
| + self.WriteValidUnitTest(func, file, invalid_test, {
|
| + 'resource_name': func.GetInfo('resource_type').lower(),
|
| + })
|
|
|
| def WriteImmediateServiceUnitTest(self, func, file):
|
| """Overrriden from TypeHandler."""
|
|
|