Index: remoting/host/host_mock_objects.h |
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h |
index b5f1db9b810ff79a231adecc0d8b232710253531..027a83e5bd2cefa95342b6e7e2f8ed91f7456819 100644 |
--- a/remoting/host/host_mock_objects.h |
+++ b/remoting/host/host_mock_objects.h |
@@ -5,11 +5,16 @@ |
#ifndef REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
#define REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |
+#include <string> |
+ |
#include "net/base/ip_endpoint.h" |
#include "remoting/host/chromoting_host_context.h" |
#include "remoting/host/client_session.h" |
#include "remoting/host/client_session_control.h" |
#include "remoting/host/desktop_environment.h" |
+#include "remoting/host/gnubby_auth_handler.h" |
+#include "remoting/host/gnubby_connection.h" |
+#include "remoting/host/gnubby_connection_factory.h" |
#include "remoting/host/host_status_observer.h" |
#include "remoting/host/input_injector.h" |
#include "remoting/host/screen_controls.h" |
@@ -126,6 +131,59 @@ class MockHostStatusObserver : public HostStatusObserver { |
MOCK_METHOD0(OnShutdown, void()); |
}; |
+class MockGnubbyAuthHandler : public GnubbyAuthHandler { |
+ public: |
+ MockGnubbyAuthHandler( |
+ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
+ GnubbyConnectionFactory* gnubby_connection_factory, |
+ protocol::ClientStub* client_stub); |
+ virtual ~MockGnubbyAuthHandler(); |
+ |
+ MOCK_METHOD1(DeliverClientMessage, void(const std::string message)); |
+ MOCK_METHOD1(ConnectionClosed, void(int connection_id)); |
+ MOCK_METHOD2(ConnectionError, void(int connection_id, int result)); |
+ MOCK_CONST_METHOD2(DeliverHostControlMessage, |
+ void(const std::string control_type, |
+ const std::string data)); |
+ MOCK_CONST_METHOD2(DeliverHostDataMessage, |
+ void(int connection_id, const std::string data)); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockGnubbyAuthHandler); |
+}; |
+ |
+class MockGnubbyConnection : public GnubbyConnection { |
+ public: |
+ MockGnubbyConnection( |
+ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
+ GnubbyAuthHandler* auth_handler, |
+ int connection_id, |
+ net::StreamSocket* socket); |
+ virtual ~MockGnubbyConnection(); |
+ |
+ MOCK_METHOD0(Read, void()); |
+ MOCK_METHOD1(Write, void(const std::string& data)); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockGnubbyConnection); |
+}; |
+ |
+class MockGnubbyConnectionFactory : public GnubbyConnectionFactory { |
+ public: |
+ MockGnubbyConnectionFactory(); |
+ virtual ~MockGnubbyConnectionFactory(); |
+ |
+ MOCK_METHOD4(Create, |
+ GnubbyConnection*(scoped_refptr<base::SingleThreadTaskRunner> |
+ network_task_runner, |
+ GnubbyAuthHandler* auth_handler, |
+ int connection_id, |
+ net::StreamSocket* socket)); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockGnubbyConnectionFactory); |
+}; |
+ |
} // namespace remoting |
#endif // REMOTING_HOST_HOST_MOCK_OBJECTS_H_ |