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_PROTOCOL_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_PROTOCOL_MOCK_OBJECTS_H_ |
6 #define REMOTING_PROTOCOL_MOCK_OBJECTS_H_ | 6 #define REMOTING_PROTOCOL_MOCK_OBJECTS_H_ |
7 | 7 |
8 #include "remoting/proto/internal.pb.h" | 8 #include "remoting/proto/internal.pb.h" |
9 #include "remoting/protocol/connection_to_client.h" | 9 #include "remoting/protocol/connection_to_client.h" |
| 10 #include "remoting/protocol/host_stub.h" |
| 11 #include "remoting/protocol/input_stub.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
11 | 13 |
12 namespace remoting { | 14 namespace remoting { |
13 namespace protocol { | 15 namespace protocol { |
14 | 16 |
15 class ChromotocolConnection; | 17 class ChromotocolConnection; |
16 | 18 |
17 class MockConnectionToClient : public ConnectionToClient { | 19 class MockConnectionToClient : public ConnectionToClient { |
18 public: | 20 public: |
19 MockConnectionToClient() {} | 21 MockConnectionToClient() {} |
(...skipping 17 matching lines...) Expand all Loading... |
37 void(ConnectionToClient* viewer, | 39 void(ConnectionToClient* viewer, |
38 ChromotingClientMessage* message)); | 40 ChromotingClientMessage* message)); |
39 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection)); | 41 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection)); |
40 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection)); | 42 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection)); |
41 MOCK_METHOD1(OnConnectionFailed, void(ConnectionToClient* connection)); | 43 MOCK_METHOD1(OnConnectionFailed, void(ConnectionToClient* connection)); |
42 | 44 |
43 private: | 45 private: |
44 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); | 46 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); |
45 }; | 47 }; |
46 | 48 |
| 49 class MockInputStub : public InputStub { |
| 50 public: |
| 51 MockInputStub() {} |
| 52 |
| 53 MOCK_METHOD2(InjectKeyEvent, void(const KeyEvent* event, Task* done)); |
| 54 MOCK_METHOD2(InjectMouseEvent, void(const MouseEvent* event, Task* done)); |
| 55 |
| 56 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(MockInputStub); |
| 58 }; |
| 59 |
| 60 class MockHostStub : public HostStub { |
| 61 public: |
| 62 MockHostStub() {} |
| 63 |
| 64 MOCK_METHOD2(SuggestResolution, void(const SuggestResolutionRequest* msg, |
| 65 Task* done)); |
| 66 |
| 67 private: |
| 68 DISALLOW_COPY_AND_ASSIGN(MockHostStub); |
| 69 }; |
| 70 |
47 } // namespace protocol | 71 } // namespace protocol |
48 } // namespace remoting | 72 } // namespace remoting |
49 | 73 |
50 #endif // REMOTING_PROTOCOL_MOCK_OBJECTS_H_ | 74 #endif // REMOTING_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |