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 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
11 #include "remoting/proto/internal.pb.h" | 11 #include "remoting/proto/internal.pb.h" |
12 #include "remoting/protocol/client_stub.h" | 12 #include "remoting/protocol/client_stub.h" |
13 #include "remoting/protocol/clipboard_stub.h" | 13 #include "remoting/protocol/clipboard_stub.h" |
14 #include "remoting/protocol/connection_to_client.h" | 14 #include "remoting/protocol/connection_to_client.h" |
15 #include "remoting/protocol/host_event_stub.h" | 15 #include "remoting/protocol/host_event_stub.h" |
16 #include "remoting/protocol/host_stub.h" | 16 #include "remoting/protocol/host_stub.h" |
17 #include "remoting/protocol/input_stub.h" | 17 #include "remoting/protocol/input_stub.h" |
18 #include "remoting/protocol/session.h" | 18 #include "remoting/protocol/session.h" |
| 19 #include "remoting/protocol/transport.h" |
19 #include "remoting/protocol/video_stub.h" | 20 #include "remoting/protocol/video_stub.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
21 | 22 |
22 namespace remoting { | 23 namespace remoting { |
23 namespace protocol { | 24 namespace protocol { |
24 | 25 |
25 class MockConnectionToClient : public ConnectionToClient { | 26 class MockConnectionToClient : public ConnectionToClient { |
26 public: | 27 public: |
27 MockConnectionToClient(Session* session, | 28 MockConnectionToClient(Session* session, |
28 HostStub* host_stub, | 29 HostStub* host_stub, |
(...skipping 15 matching lines...) Expand all Loading... |
44 public: | 45 public: |
45 MockConnectionToClientEventHandler(); | 46 MockConnectionToClientEventHandler(); |
46 virtual ~MockConnectionToClientEventHandler(); | 47 virtual ~MockConnectionToClientEventHandler(); |
47 | 48 |
48 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection)); | 49 MOCK_METHOD1(OnConnectionOpened, void(ConnectionToClient* connection)); |
49 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection)); | 50 MOCK_METHOD1(OnConnectionClosed, void(ConnectionToClient* connection)); |
50 MOCK_METHOD2(OnConnectionFailed, void(ConnectionToClient* connection, | 51 MOCK_METHOD2(OnConnectionFailed, void(ConnectionToClient* connection, |
51 ErrorCode error)); | 52 ErrorCode error)); |
52 MOCK_METHOD2(OnSequenceNumberUpdated, void(ConnectionToClient* connection, | 53 MOCK_METHOD2(OnSequenceNumberUpdated, void(ConnectionToClient* connection, |
53 int64 sequence_number)); | 54 int64 sequence_number)); |
54 MOCK_METHOD4(OnRouteChange, void( | 55 MOCK_METHOD3(OnRouteChange, void(ConnectionToClient* connection, |
55 ConnectionToClient* connection, | 56 const std::string& channel_name, |
56 const std::string& channel_name, | 57 const TransportRoute& route)); |
57 const net::IPEndPoint& remote_end_point, | |
58 const net::IPEndPoint& local_end_point)); | |
59 | 58 |
60 private: | 59 private: |
61 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); | 60 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClientEventHandler); |
62 }; | 61 }; |
63 | 62 |
64 class MockClipboardStub : public ClipboardStub { | 63 class MockClipboardStub : public ClipboardStub { |
65 public: | 64 public: |
66 MockClipboardStub(); | 65 MockClipboardStub(); |
67 virtual ~MockClipboardStub(); | 66 virtual ~MockClipboardStub(); |
68 | 67 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 MOCK_METHOD0(Close, void()); | 160 MOCK_METHOD0(Close, void()); |
162 | 161 |
163 private: | 162 private: |
164 DISALLOW_COPY_AND_ASSIGN(MockSession); | 163 DISALLOW_COPY_AND_ASSIGN(MockSession); |
165 }; | 164 }; |
166 | 165 |
167 } // namespace protocol | 166 } // namespace protocol |
168 } // namespace remoting | 167 } // namespace remoting |
169 | 168 |
170 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 169 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |