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 // This file contains definitions for mock objects, used for testing. | 5 // This file contains definitions for mock objects, used for testing. |
6 | 6 |
7 // TODO(apatrick): This file "manually" defines some mock objects. Using gMock | 7 // TODO(apatrick): This file "manually" defines some mock objects. Using gMock |
8 // would be definitely preferable, unfortunately it doesn't work on Windows yet. | 8 // would be definitely preferable, unfortunately it doesn't work on Windows yet. |
9 | 9 |
10 #ifndef GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 private: | 85 private: |
86 CommandBufferEngine *engine_; | 86 CommandBufferEngine *engine_; |
87 }; | 87 }; |
88 | 88 |
89 namespace gles2 { | 89 namespace gles2 { |
90 | 90 |
91 class MockShaderTranslator : public ShaderTranslatorInterface { | 91 class MockShaderTranslator : public ShaderTranslatorInterface { |
92 public: | 92 public: |
93 MockShaderTranslator(); | 93 MockShaderTranslator(); |
94 | 94 |
95 MOCK_METHOD5(Init, | 95 MOCK_METHOD6(Init, |
96 bool(sh::GLenum shader_type, | 96 bool(sh::GLenum shader_type, |
97 ShShaderSpec shader_spec, | 97 ShShaderSpec shader_spec, |
98 const ShBuiltInResources* resources, | 98 const ShBuiltInResources* resources, |
99 ShShaderOutput shader_output_language, | 99 ShShaderOutput shader_output_language, |
100 ShCompileOptions driver_bug_workarounds)); | 100 ShCompileOptions driver_bug_workarounds, |
| 101 bool gl_shader_interm_output)); |
101 MOCK_CONST_METHOD10(Translate, | 102 MOCK_CONST_METHOD10(Translate, |
102 bool(const std::string& shader_source, | 103 bool(const std::string& shader_source, |
103 std::string* info_log, | 104 std::string* info_log, |
104 std::string* translated_source, | 105 std::string* translated_source, |
105 int* shader_version, | 106 int* shader_version, |
106 AttributeMap* attrib_map, | 107 AttributeMap* attrib_map, |
107 UniformMap* uniform_map, | 108 UniformMap* uniform_map, |
108 VaryingMap* varying_map, | 109 VaryingMap* varying_map, |
109 InterfaceBlockMap* interface_block_map, | 110 InterfaceBlockMap* interface_block_map, |
110 OutputVariableList* output_variable_list, | 111 OutputVariableList* output_variable_list, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 private: | 158 private: |
158 friend class ::testing::StrictMock<MockMemoryTracker>; | 159 friend class ::testing::StrictMock<MockMemoryTracker>; |
159 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; | 160 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; |
160 virtual ~MockMemoryTracker(); | 161 virtual ~MockMemoryTracker(); |
161 }; | 162 }; |
162 | 163 |
163 } // namespace gles2 | 164 } // namespace gles2 |
164 } // namespace gpu | 165 } // namespace gpu |
165 | 166 |
166 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 167 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ |
OLD | NEW |