Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: remoting/host/host_mock_objects.h

Issue 6250198: More out-of-lining of test code, along with a bunch of GMOCK objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix the gyp files this time Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 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 REMOTING_HOST_MOCK_OBJECTS_H_ 5 #ifndef REMOTING_HOST_HOST_MOCK_OBJECTS_H_
6 #define REMOTING_HOST_MOCK_OBJECTS_H_ 6 #define REMOTING_HOST_HOST_MOCK_OBJECTS_H_
7 7
8 #include "remoting/host/capturer.h" 8 #include "remoting/host/capturer.h"
9 #include "remoting/host/chromoting_host_context.h" 9 #include "remoting/host/chromoting_host_context.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 13
14 class MockCapturer : public Capturer { 14 class MockCapturer : public Capturer {
15 public: 15 public:
16 MockCapturer() : Capturer(NULL) {} 16 MockCapturer();
17 virtual ~MockCapturer();
17 18
18 MOCK_METHOD0(ScreenConfigurationChanged, void()); 19 MOCK_METHOD0(ScreenConfigurationChanged, void());
19 MOCK_METHOD1(InvalidateRects, void(const InvalidRects& inval_rects)); 20 MOCK_METHOD1(InvalidateRects, void(const InvalidRects& inval_rects));
20 MOCK_METHOD0(InvalidateFullScreen, void()); 21 MOCK_METHOD0(InvalidateFullScreen, void());
21 MOCK_METHOD0(CalculateInvalidRects, void()); 22 MOCK_METHOD0(CalculateInvalidRects, void());
22 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback)); 23 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback));
23 MOCK_METHOD2(CaptureRects, void(const InvalidRects& rects, 24 MOCK_METHOD2(CaptureRects, void(const InvalidRects& rects,
24 CaptureCompletedCallback* callback)); 25 CaptureCompletedCallback* callback));
25 MOCK_CONST_METHOD0(width, int()); 26 MOCK_CONST_METHOD0(width, int());
26 MOCK_CONST_METHOD0(height, int()); 27 MOCK_CONST_METHOD0(height, int());
27 28
28 private: 29 private:
29 DISALLOW_COPY_AND_ASSIGN(MockCapturer); 30 DISALLOW_COPY_AND_ASSIGN(MockCapturer);
30 }; 31 };
31 32
32 class MockChromotingHostContext : public ChromotingHostContext { 33 class MockChromotingHostContext : public ChromotingHostContext {
33 public: 34 public:
34 MockChromotingHostContext() {} 35 MockChromotingHostContext();
36 virtual ~MockChromotingHostContext();
35 37
36 MOCK_METHOD0(Start, void()); 38 MOCK_METHOD0(Start, void());
37 MOCK_METHOD0(Stop, void()); 39 MOCK_METHOD0(Stop, void());
38 MOCK_METHOD0(jingle_thread, JingleThread*()); 40 MOCK_METHOD0(jingle_thread, JingleThread*());
39 MOCK_METHOD0(main_message_loop, MessageLoop*()); 41 MOCK_METHOD0(main_message_loop, MessageLoop*());
40 MOCK_METHOD0(encode_message_loop, MessageLoop*()); 42 MOCK_METHOD0(encode_message_loop, MessageLoop*());
41 MOCK_METHOD0(network_message_loop, MessageLoop*()); 43 MOCK_METHOD0(network_message_loop, MessageLoop*());
42 44
43 private: 45 private:
44 DISALLOW_COPY_AND_ASSIGN(MockChromotingHostContext); 46 DISALLOW_COPY_AND_ASSIGN(MockChromotingHostContext);
45 }; 47 };
46 48
47 } // namespace remoting 49 } // namespace remoting
48 50
49 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ 51 #endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698