| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 110  private: | 110  private: | 
| 111   MOCK_METHOD0(ClearBackend, void()); | 111   MOCK_METHOD0(ClearBackend, void()); | 
| 112 }; | 112 }; | 
| 113 | 113 | 
| 114 class MockMemoryTracker : public MemoryTracker { | 114 class MockMemoryTracker : public MemoryTracker { | 
| 115  public: | 115  public: | 
| 116   MockMemoryTracker(); | 116   MockMemoryTracker(); | 
| 117 | 117 | 
| 118   MOCK_METHOD3(TrackMemoryAllocatedChange, void( | 118   MOCK_METHOD3(TrackMemoryAllocatedChange, void( | 
| 119       size_t old_size, size_t new_size, Pool pool)); | 119       size_t old_size, size_t new_size, Pool pool)); | 
|  | 120   MOCK_METHOD1(EnsureGPUMemoryAvailable, bool(size_t size_needed)); | 
| 120 | 121 | 
| 121  private: | 122  private: | 
| 122   friend class ::testing::StrictMock<MockMemoryTracker>; | 123   friend class ::testing::StrictMock<MockMemoryTracker>; | 
| 123   friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; | 124   friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; | 
| 124   virtual ~MockMemoryTracker(); | 125   virtual ~MockMemoryTracker(); | 
| 125 }; | 126 }; | 
| 126 | 127 | 
| 127 }  // namespace gles2 | 128 }  // namespace gles2 | 
| 128 }  // namespace gpu | 129 }  // namespace gpu | 
| 129 | 130 | 
| 130 #endif  // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 131 #endif  // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ | 
| OLD | NEW | 
|---|