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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 MOCK_METHOD0(ClearBackend, void()); | 138 MOCK_METHOD0(ClearBackend, void()); |
139 }; | 139 }; |
140 | 140 |
141 class MockMemoryTracker : public MemoryTracker { | 141 class MockMemoryTracker : public MemoryTracker { |
142 public: | 142 public: |
143 MockMemoryTracker(); | 143 MockMemoryTracker(); |
144 | 144 |
145 MOCK_METHOD3(TrackMemoryAllocatedChange, void( | 145 MOCK_METHOD3(TrackMemoryAllocatedChange, void( |
146 size_t old_size, size_t new_size, Pool pool)); | 146 size_t old_size, size_t new_size, Pool pool)); |
147 MOCK_METHOD1(EnsureGPUMemoryAvailable, bool(size_t size_needed)); | 147 MOCK_METHOD1(EnsureGPUMemoryAvailable, bool(size_t size_needed)); |
| 148 MOCK_CONST_METHOD0(ClientTracingId, uint64_t()); |
| 149 MOCK_CONST_METHOD0(ClientId, int()); |
148 | 150 |
149 private: | 151 private: |
150 friend class ::testing::StrictMock<MockMemoryTracker>; | 152 friend class ::testing::StrictMock<MockMemoryTracker>; |
151 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; | 153 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; |
152 virtual ~MockMemoryTracker(); | 154 virtual ~MockMemoryTracker(); |
153 }; | 155 }; |
154 | 156 |
155 } // namespace gles2 | 157 } // namespace gles2 |
156 } // namespace gpu | 158 } // namespace gpu |
157 | 159 |
158 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 160 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ |
OLD | NEW |