Index: remoting/protocol/protocol_mock_objects.h |
diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h |
index 4d0302591641b3f5a240d4036a0c35b081601995..015086677fd8d7c7c23875f3e9871510d010a2c6 100644 |
--- a/remoting/protocol/protocol_mock_objects.h |
+++ b/remoting/protocol/protocol_mock_objects.h |
@@ -5,9 +5,9 @@ |
#ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
#define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
-#include <stdint.h> |
- |
+#include <cstdint> |
#include <map> |
+#include <memory> |
#include <string> |
#include "base/location.h" |
@@ -19,6 +19,7 @@ |
#include "remoting/proto/internal.pb.h" |
#include "remoting/proto/video.pb.h" |
#include "remoting/protocol/authenticator.h" |
+#include "remoting/protocol/channel_authenticator.h" |
#include "remoting/protocol/client_stub.h" |
#include "remoting/protocol/clipboard_stub.h" |
#include "remoting/protocol/connection_to_client.h" |
@@ -30,10 +31,39 @@ |
#include "remoting/protocol/transport.h" |
#include "remoting/protocol/video_stub.h" |
#include "testing/gmock/include/gmock/gmock.h" |
+#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
namespace remoting { |
namespace protocol { |
+class MockAuthenticator : public Authenticator { |
+ public: |
+ MockAuthenticator(); |
+ ~MockAuthenticator() override; |
+ |
+ MOCK_CONST_METHOD0(state, Authenticator::State()); |
+ MOCK_CONST_METHOD0(started, bool()); |
+ MOCK_CONST_METHOD0(rejection_reason, Authenticator::RejectionReason()); |
+ MOCK_CONST_METHOD0(GetAuthKey, const std::string&()); |
+ MOCK_CONST_METHOD0(CreateChannelAuthenticatorPtr, ChannelAuthenticator*()); |
+ MOCK_METHOD2(ProcessMessage, |
+ void(const buzz::XmlElement* message, |
+ const base::Closure& resume_callback)); |
+ MOCK_METHOD0(GetNextMessagePtr, buzz::XmlElement*()); |
+ |
+ std::unique_ptr<ChannelAuthenticator> CreateChannelAuthenticator() |
+ const override { |
+ return base::WrapUnique(CreateChannelAuthenticatorPtr()); |
+ } |
+ |
+ std::unique_ptr<buzz::XmlElement> GetNextMessage() override { |
+ return base::WrapUnique(GetNextMessagePtr()); |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); |
+}; |
+ |
class MockConnectionToClientEventHandler |
: public ConnectionToClient::EventHandler { |
public: |