OLD | NEW |
---|---|
1 // Copyright (c) 2011 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_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 "remoting/proto/internal.pb.h" | 8 #include "remoting/proto/internal.pb.h" |
9 #include "remoting/protocol/client_stub.h" | 9 #include "remoting/protocol/client_stub.h" |
10 #include "remoting/protocol/connection_to_client.h" | 10 #include "remoting/protocol/connection_to_client.h" |
11 #include "remoting/protocol/host_stub.h" | 11 #include "remoting/protocol/host_stub.h" |
12 #include "remoting/protocol/input_stub.h" | 12 #include "remoting/protocol/input_stub.h" |
13 #include "remoting/protocol/session.h" | 13 #include "remoting/protocol/session.h" |
14 #include "remoting/protocol/video_stub.h" | 14 #include "remoting/protocol/video_stub.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 namespace protocol { | 18 namespace protocol { |
19 | 19 |
20 class ChromotocolConnection; | 20 class ChromotocolConnection; |
21 | 21 |
22 class MockConnectionToClient : public ConnectionToClient { | 22 class MockConnectionToClient : public ConnectionToClient { |
23 public: | 23 public: |
24 MockConnectionToClient(); | 24 MockConnectionToClient(MessageLoop* message_loop, |
25 EventHandler* handler, | |
26 HostStub* host_stub, | |
27 InputStub* input_stub); | |
25 virtual ~MockConnectionToClient(); | 28 virtual ~MockConnectionToClient(); |
26 | 29 |
27 MOCK_METHOD1(Init, void(Session* session)); | 30 MOCK_METHOD1(Init, void(Session* session)); |
28 MOCK_METHOD0(video_stub, VideoStub*()); | 31 MOCK_METHOD0(video_stub, VideoStub*()); |
29 MOCK_METHOD0(client_stub, ClientStub*()); | 32 MOCK_METHOD0(client_stub, ClientStub*()); |
30 MOCK_METHOD0(session, Session*()); | 33 MOCK_METHOD0(session, Session*()); |
31 MOCK_METHOD0(Disconnect, void()); | 34 MOCK_METHOD0(Disconnect, void()); |
32 | 35 |
33 private: | 36 private: |
34 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); | 37 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 }; | 78 }; |
76 | 79 |
77 class MockClientStub : public ClientStub { | 80 class MockClientStub : public ClientStub { |
78 public: | 81 public: |
79 MockClientStub(); | 82 MockClientStub(); |
80 virtual ~MockClientStub(); | 83 virtual ~MockClientStub(); |
81 | 84 |
82 MOCK_METHOD2(NotifyResolution, void(const NotifyResolutionRequest* msg, | 85 MOCK_METHOD2(NotifyResolution, void(const NotifyResolutionRequest* msg, |
83 Task* done)); | 86 Task* done)); |
84 MOCK_METHOD2(BeginSessionResponse, void(const LocalLoginStatus* msg, | 87 MOCK_METHOD2(BeginSessionResponse, void(const LocalLoginStatus* msg, |
85 Task* done)); | 88 Task*bdone)); |
dmac
2011/03/04 01:36:27
bdone?
garykac
2011/03/04 05:33:24
Done.
| |
86 | 89 |
87 private: | 90 private: |
88 DISALLOW_COPY_AND_ASSIGN(MockClientStub); | 91 DISALLOW_COPY_AND_ASSIGN(MockClientStub); |
89 }; | 92 }; |
90 | 93 |
91 class MockVideoStub : public VideoStub { | 94 class MockVideoStub : public VideoStub { |
92 public: | 95 public: |
93 MockVideoStub(); | 96 MockVideoStub(); |
94 virtual ~MockVideoStub(); | 97 virtual ~MockVideoStub(); |
95 | 98 |
(...skipping 28 matching lines...) Expand all Loading... | |
124 MOCK_METHOD1(Close, void(Task* closed_task)); | 127 MOCK_METHOD1(Close, void(Task* closed_task)); |
125 | 128 |
126 private: | 129 private: |
127 DISALLOW_COPY_AND_ASSIGN(MockSession); | 130 DISALLOW_COPY_AND_ASSIGN(MockSession); |
128 }; | 131 }; |
129 | 132 |
130 } // namespace protocol | 133 } // namespace protocol |
131 } // namespace remoting | 134 } // namespace remoting |
132 | 135 |
133 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 136 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |