OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 REMOTING_HOST_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_HOST_MOCK_OBJECTS_H_ |
6 #define REMOTING_HOST_MOCK_OBJECTS_H_ | 6 #define REMOTING_HOST_MOCK_OBJECTS_H_ |
7 | 7 |
8 #include "remoting/host/capturer.h" | 8 #include "remoting/host/capturer.h" |
9 #include "remoting/host/event_executor.h" | |
10 #include "remoting/proto/internal.pb.h" | |
11 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
12 | 10 |
13 namespace remoting { | 11 namespace remoting { |
14 | 12 |
15 class MockCapturer : public Capturer { | 13 class MockCapturer : public Capturer { |
16 public: | 14 public: |
17 MockCapturer() {} | 15 MockCapturer() {} |
18 | 16 |
19 MOCK_METHOD0(ScreenConfigurationChanged, void()); | 17 MOCK_METHOD0(ScreenConfigurationChanged, void()); |
20 MOCK_METHOD1(InvalidateRects, void(const InvalidRects& inval_rects)); | 18 MOCK_METHOD1(InvalidateRects, void(const InvalidRects& inval_rects)); |
21 MOCK_METHOD0(InvalidateFullScreen, void()); | 19 MOCK_METHOD0(InvalidateFullScreen, void()); |
22 MOCK_METHOD0(CalculateInvalidRects, void()); | 20 MOCK_METHOD0(CalculateInvalidRects, void()); |
23 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback)); | 21 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback)); |
24 MOCK_METHOD2(CaptureRects, void(const InvalidRects& rects, | 22 MOCK_METHOD2(CaptureRects, void(const InvalidRects& rects, |
25 CaptureCompletedCallback* callback)); | 23 CaptureCompletedCallback* callback)); |
26 MOCK_CONST_METHOD0(width, int()); | 24 MOCK_CONST_METHOD0(width, int()); |
27 MOCK_CONST_METHOD0(height, int()); | 25 MOCK_CONST_METHOD0(height, int()); |
28 | 26 |
29 private: | 27 private: |
30 DISALLOW_COPY_AND_ASSIGN(MockCapturer); | 28 DISALLOW_COPY_AND_ASSIGN(MockCapturer); |
31 }; | 29 }; |
32 | 30 |
33 class MockEventExecutor : public EventExecutor { | |
34 public: | |
35 MockEventExecutor(Capturer* capturer) : EventExecutor(capturer) {} | |
36 | |
37 MOCK_METHOD1(HandleInputEvent, void(ChromotingClientMessage* messages)); | |
38 | |
39 private: | |
40 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); | |
41 }; | |
42 | |
43 } // namespace remoting | 31 } // namespace remoting |
44 | 32 |
45 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ | 33 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |