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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); | 158 DISALLOW_COPY_AND_ASSIGN(MockVideoStub); |
159 }; | 159 }; |
160 | 160 |
161 class MockSession : public Session { | 161 class MockSession : public Session { |
162 public: | 162 public: |
163 MockSession(); | 163 MockSession(); |
164 ~MockSession() override; | 164 ~MockSession() override; |
165 | 165 |
166 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); | 166 MOCK_METHOD1(SetEventHandler, void(Session::EventHandler* event_handler)); |
167 MOCK_METHOD0(error, ErrorCode()); | 167 MOCK_METHOD0(error, ErrorCode()); |
168 MOCK_METHOD0(GetTransport, Transport*()); | 168 MOCK_METHOD1(SetTransport, void(Transport*)); |
169 MOCK_METHOD0(GetQuicChannelFactory, StreamChannelFactory*()); | |
170 MOCK_METHOD0(jid, const std::string&()); | 169 MOCK_METHOD0(jid, const std::string&()); |
171 MOCK_METHOD0(candidate_config, const CandidateSessionConfig*()); | |
172 MOCK_METHOD0(config, const SessionConfig&()); | 170 MOCK_METHOD0(config, const SessionConfig&()); |
173 MOCK_METHOD0(initiator_token, const std::string&()); | |
174 MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token)); | |
175 MOCK_METHOD0(receiver_token, const std::string&()); | |
176 MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token)); | |
177 MOCK_METHOD1(set_shared_secret, void(const std::string& secret)); | |
178 MOCK_METHOD0(shared_secret, const std::string&()); | |
179 MOCK_METHOD1(Close, void(ErrorCode error)); | 171 MOCK_METHOD1(Close, void(ErrorCode error)); |
180 | 172 |
181 private: | 173 private: |
182 DISALLOW_COPY_AND_ASSIGN(MockSession); | 174 DISALLOW_COPY_AND_ASSIGN(MockSession); |
183 }; | 175 }; |
184 | 176 |
185 class MockSessionManager : public SessionManager { | 177 class MockSessionManager : public SessionManager { |
186 public: | 178 public: |
187 MockSessionManager(); | 179 MockSessionManager(); |
188 ~MockSessionManager() override; | 180 ~MockSessionManager() override; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // Runs tasks synchronously instead of posting them to |task_runner|. | 231 // Runs tasks synchronously instead of posting them to |task_runner|. |
240 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 232 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
241 const tracked_objects::Location& from_here, | 233 const tracked_objects::Location& from_here, |
242 const base::Closure& task) override; | 234 const base::Closure& task) override; |
243 }; | 235 }; |
244 | 236 |
245 } // namespace protocol | 237 } // namespace protocol |
246 } // namespace remoting | 238 } // namespace remoting |
247 | 239 |
248 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 240 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |