| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 public: | 92 public: |
| 93 MockShaderTranslator(); | 93 MockShaderTranslator(); |
| 94 | 94 |
| 95 MOCK_METHOD6(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 bool gl_shader_interm_output)); |
| 102 MOCK_CONST_METHOD10(Translate, | 102 MOCK_CONST_METHOD9(Translate, |
| 103 bool(const std::string& shader_source, | 103 bool(const std::string& shader_source, |
| 104 std::string* info_log, | 104 std::string* info_log, |
| 105 std::string* translated_source, | 105 std::string* translated_source, |
| 106 int* shader_version, | 106 int* shader_version, |
| 107 AttributeMap* attrib_map, | 107 AttributeMap* attrib_map, |
| 108 UniformMap* uniform_map, | 108 UniformMap* uniform_map, |
| 109 VaryingMap* varying_map, | 109 VaryingMap* varying_map, |
| 110 InterfaceBlockMap* interface_block_map, | 110 InterfaceBlockMap* interface_block_map, |
| 111 OutputVariableList* output_variable_list, | 111 OutputVariableList* output_variable_list)); |
| 112 NameMap* name_map)); | |
| 113 MOCK_CONST_METHOD0( | 112 MOCK_CONST_METHOD0( |
| 114 GetStringForOptionsThatWouldAffectCompilation, std::string()); | 113 GetStringForOptionsThatWouldAffectCompilation, std::string()); |
| 115 private: | 114 private: |
| 116 ~MockShaderTranslator() override; | 115 ~MockShaderTranslator() override; |
| 117 }; | 116 }; |
| 118 | 117 |
| 119 class MockProgramCache : public ProgramCache { | 118 class MockProgramCache : public ProgramCache { |
| 120 public: | 119 public: |
| 121 MockProgramCache(); | 120 MockProgramCache(); |
| 122 virtual ~MockProgramCache(); | 121 virtual ~MockProgramCache(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 private: | 157 private: |
| 159 friend class ::testing::StrictMock<MockMemoryTracker>; | 158 friend class ::testing::StrictMock<MockMemoryTracker>; |
| 160 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; | 159 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; |
| 161 virtual ~MockMemoryTracker(); | 160 virtual ~MockMemoryTracker(); |
| 162 }; | 161 }; |
| 163 | 162 |
| 164 } // namespace gles2 | 163 } // namespace gles2 |
| 165 } // namespace gpu | 164 } // namespace gpu |
| 166 | 165 |
| 167 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 166 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ |
| OLD | NEW |