| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Tests for GLES2Implementation. | 5 // Tests for GLES2Implementation. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2989 // Test GetQueryObjectuivEXT fails if bad id | 2989 // Test GetQueryObjectuivEXT fails if bad id |
| 2990 ClearCommands(); | 2990 ClearCommands(); |
| 2991 gl_->GetQueryObjectuivEXT(4567, GL_QUERY_RESULT_AVAILABLE_EXT, &available); | 2991 gl_->GetQueryObjectuivEXT(4567, GL_QUERY_RESULT_AVAILABLE_EXT, &available); |
| 2992 EXPECT_TRUE(NoCommandsWritten()); | 2992 EXPECT_TRUE(NoCommandsWritten()); |
| 2993 EXPECT_EQ(0xBDu, available); | 2993 EXPECT_EQ(0xBDu, available); |
| 2994 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); | 2994 EXPECT_EQ(GL_INVALID_OPERATION, CheckError()); |
| 2995 | 2995 |
| 2996 // Test GetQueryObjectuivEXT CheckResultsAvailable | 2996 // Test GetQueryObjectuivEXT CheckResultsAvailable |
| 2997 ClearCommands(); | 2997 ClearCommands(); |
| 2998 gl_->GetQueryObjectuivEXT(id1, GL_QUERY_RESULT_AVAILABLE_EXT, &available); | 2998 gl_->GetQueryObjectuivEXT(id1, GL_QUERY_RESULT_AVAILABLE_EXT, &available); |
| 2999 EXPECT_TRUE(NoCommandsWritten()); | |
| 3000 EXPECT_EQ(0u, available); | 2999 EXPECT_EQ(0u, available); |
| 3001 } | 3000 } |
| 3002 | 3001 |
| 3003 TEST_F(GLES2ImplementationTest, ErrorQuery) { | 3002 TEST_F(GLES2ImplementationTest, ErrorQuery) { |
| 3004 GLuint id = 0; | 3003 GLuint id = 0; |
| 3005 gl_->GenQueriesEXT(1, &id); | 3004 gl_->GenQueriesEXT(1, &id); |
| 3006 ClearCommands(); | 3005 ClearCommands(); |
| 3007 | 3006 |
| 3008 // Test BeginQueryEXT does NOT insert commands. | 3007 // Test BeginQueryEXT does NOT insert commands. |
| 3009 gl_->BeginQueryEXT(GL_GET_ERROR_QUERY_CHROMIUM, id); | 3008 gl_->BeginQueryEXT(GL_GET_ERROR_QUERY_CHROMIUM, id); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3183 ContextInitOptions init_options; | 3182 ContextInitOptions init_options; |
| 3184 init_options.bind_generates_resource_client = true; | 3183 init_options.bind_generates_resource_client = true; |
| 3185 init_options.bind_generates_resource_service = false; | 3184 init_options.bind_generates_resource_service = false; |
| 3186 EXPECT_FALSE(Initialize(init_options)); | 3185 EXPECT_FALSE(Initialize(init_options)); |
| 3187 } | 3186 } |
| 3188 | 3187 |
| 3189 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 3188 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 3190 | 3189 |
| 3191 } // namespace gles2 | 3190 } // namespace gles2 |
| 3192 } // namespace gpu | 3191 } // namespace gpu |
| OLD | NEW |