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" | 10 #include "remoting/protocol/host_stub.h" |
11 #include "remoting/protocol/input_stub.h" | 11 #include "remoting/protocol/input_stub.h" |
12 #include "remoting/protocol/video_stub.h" | 12 #include "remoting/protocol/video_stub.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 namespace protocol { | 16 namespace protocol { |
17 | 17 |
18 class ChromotocolConnection; | 18 class ChromotocolConnection; |
19 | 19 |
20 class MockConnectionToClient : public ConnectionToClient { | 20 class MockConnectionToClient : public ConnectionToClient { |
21 public: | 21 public: |
22 MockConnectionToClient() {} | 22 MockConnectionToClient() {} |
23 | 23 |
24 MOCK_METHOD1(Init, void(ChromotocolConnection* connection)); | 24 MOCK_METHOD1(Init, void(ChromotocolConnection* connection)); |
25 MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); | |
26 MOCK_METHOD0(video_stub, VideoStub*()); | 25 MOCK_METHOD0(video_stub, VideoStub*()); |
27 MOCK_METHOD0(Disconnect, void()); | 26 MOCK_METHOD0(Disconnect, void()); |
28 | 27 |
29 private: | 28 private: |
30 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); | 29 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); |
31 }; | 30 }; |
32 | 31 |
33 class MockConnectionToClientEventHandler : | 32 class MockConnectionToClientEventHandler : |
34 public ConnectionToClient::EventHandler { | 33 public ConnectionToClient::EventHandler { |
35 public: | 34 public: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 MOCK_METHOD0(GetPendingPackets, int()); | 76 MOCK_METHOD0(GetPendingPackets, int()); |
78 | 77 |
79 private: | 78 private: |
80 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); | 79 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); |
81 }; | 80 }; |
82 | 81 |
83 } // namespace protocol | 82 } // namespace protocol |
84 } // namespace remoting | 83 } // namespace remoting |
85 | 84 |
86 #endif // REMOTING_PROTOCOL_MOCK_OBJECTS_H_ | 85 #endif // REMOTING_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |