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