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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ |
7 | 7 |
8 #include "gpu/command_buffer/service/gpu_scheduler.h" | 8 #include "gpu/command_buffer/service/gpu_scheduler.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 | 10 |
11 namespace gpu { | 11 namespace gpu { |
12 | 12 |
13 class MockGpuScheduler : public GpuScheduler { | 13 class MockGpuScheduler : public GpuScheduler { |
14 public: | 14 public: |
15 explicit MockGpuScheduler(CommandBuffer* command_buffer) | 15 explicit MockGpuScheduler(CommandBuffer* command_buffer) |
16 : GpuScheduler(command_buffer) { | 16 : GpuScheduler(command_buffer) { |
17 } | 17 } |
18 | 18 |
19 MOCK_METHOD0(ProcessCommands, void()); | |
20 MOCK_METHOD1(GetSharedMemoryBuffer, Buffer(int32 shm_id)); | 19 MOCK_METHOD1(GetSharedMemoryBuffer, Buffer(int32 shm_id)); |
21 MOCK_METHOD1(set_token, void(int32 token)); | 20 MOCK_METHOD1(set_token, void(int32 token)); |
22 | 21 |
23 private: | 22 private: |
24 DISALLOW_COPY_AND_ASSIGN(MockGpuScheduler); | 23 DISALLOW_COPY_AND_ASSIGN(MockGpuScheduler); |
25 }; | 24 }; |
26 | 25 |
27 } // namespace gpu | 26 } // namespace gpu |
28 | 27 |
29 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ | 28 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_MOCK_H_ |
OLD | NEW |