Chromium Code Reviews| Index: remoting/protocol/protocol_mock_objects.h |
| diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h |
| index 2ebbf5895d32ac6db9d9d72d3b244e40d853dedb..7bca8ea0cd87c30536a6b4795563a79062205073 100644 |
| --- a/remoting/protocol/protocol_mock_objects.h |
| +++ b/remoting/protocol/protocol_mock_objects.h |
| @@ -17,6 +17,7 @@ |
| #include "remoting/protocol/host_stub.h" |
| #include "remoting/protocol/input_stub.h" |
| #include "remoting/protocol/session.h" |
| +#include "remoting/protocol/session_manager.h" |
| #include "remoting/protocol/transport.h" |
| #include "remoting/protocol/video_stub.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| @@ -176,6 +177,39 @@ class MockSession : public Session { |
| DISALLOW_COPY_AND_ASSIGN(MockSession); |
| }; |
| +class MockSessionManager : public SessionManager { |
| + public: |
| + MockSessionManager(); |
| + virtual ~MockSessionManager(); |
| + |
| + MOCK_METHOD2(Init, void(SignalStrategy*, Listener*)); |
| + MOCK_METHOD4(ConnectPtr, Session*( |
| + const std::string&, |
| + Authenticator*, |
| + CandidateSessionConfig*, |
| + const Session::StateChangeCallback&)); |
| + MOCK_METHOD0(Close, void()); |
| + MOCK_METHOD1(set_authenticator_factory_ptr, void(AuthenticatorFactory*)); |
| + virtual scoped_ptr<Session> Connect( |
| + const std::string& host_jid, |
| + scoped_ptr<Authenticator> authenticator, |
| + scoped_ptr<CandidateSessionConfig> config, |
| + const Session::StateChangeCallback& state_change_callback) { |
| + return scoped_ptr<Session>(ConnectPtr( |
| + host_jid, |
| + authenticator.release(), |
|
Wez
2012/06/12 21:20:10
Shouldn't these be get(), so that they get clean-u
simonmorris
2012/06/13 16:26:33
Done.
|
| + config.release(), |
| + state_change_callback)); |
| + }; |
| + virtual void set_authenticator_factory( |
| + scoped_ptr<AuthenticatorFactory> authenticator_factory) { |
| + set_authenticator_factory_ptr(authenticator_factory.release()); |
| + }; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MockSessionManager); |
| +}; |
| + |
| } // namespace protocol |
| } // namespace remoting |