Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file implements mock GL Interface for unit testing. It has to mock | 5 // This file implements mock GL Interface for unit testing. It has to mock |
| 6 // Desktop GL, not GLES2 as it is used to test the service side code. | 6 // Desktop GL, not GLES2 as it is used to test the service side code. |
| 7 | 7 |
| 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
| 9 #define GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 9 #define GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| 12 #if defined(USE_X11) | |
|
Ami GONE FROM CHROMIUM
2011/09/21 22:21:42
Ditto comment on id_manager_unittest.cc.
dominich
2011/09/22 17:00:15
Done.
| |
| 13 // These are defined by both gtest and Xlib so we need to undefine them before | |
| 14 // including the gtest header. Obviously the gtest definition will replace the | |
| 15 // Xlib one for the remainder of this file. | |
| 16 #undef Bool | |
| 17 #undef None | |
| 18 #undef Status | |
| 19 #endif | |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "ui/gfx/gl/gl_interface.h" | 21 #include "ui/gfx/gl/gl_interface.h" |
| 14 | 22 |
| 15 namespace gfx { | 23 namespace gfx { |
| 16 | 24 |
| 17 class MockGLInterface : public GLInterface { | 25 class MockGLInterface : public GLInterface { |
| 18 public: | 26 public: |
| 19 MockGLInterface(); | 27 MockGLInterface(); |
| 20 virtual ~MockGLInterface(); | 28 virtual ~MockGLInterface(); |
| 21 | 29 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); | 448 MOCK_METHOD3(GetFenceivNV, void(GLuint fence, GLenum pname, GLint *params)); |
| 441 | 449 |
| 442 MOCK_METHOD1(SetSurfaceCHROMIUM, void(GLuint)); | 450 MOCK_METHOD1(SetSurfaceCHROMIUM, void(GLuint)); |
| 443 | 451 |
| 444 MOCK_METHOD0(GetGraphicsResetStatusARB, GLenum()); | 452 MOCK_METHOD0(GetGraphicsResetStatusARB, GLenum()); |
| 445 }; | 453 }; |
| 446 | 454 |
| 447 } // namespace gfx | 455 } // namespace gfx |
| 448 | 456 |
| 449 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ | 457 #endif // GPU_COMMAND_BUFFER_COMMON_GL_MOCK_H_ |
| 450 | |
| OLD | NEW |