Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: remoting/protocol/mock_objects.h

Issue 6266010: Fix crashes in ChromotingHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/mock_objects.h
diff --git a/remoting/protocol/mock_objects.h b/remoting/protocol/mock_objects.h
index 045a414255023a5e5356bedccd5121bce6a97c82..99826c28f840a82d978486121a545209c14c1b93 100644
--- a/remoting/protocol/mock_objects.h
+++ b/remoting/protocol/mock_objects.h
@@ -6,9 +6,11 @@
#define REMOTING_PROTOCOL_MOCK_OBJECTS_H_
#include "remoting/proto/internal.pb.h"
+#include "remoting/protocol/client_stub.h"
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/input_stub.h"
+#include "remoting/protocol/session.h"
#include "remoting/protocol/video_stub.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -21,8 +23,10 @@ class MockConnectionToClient : public ConnectionToClient {
public:
MockConnectionToClient() {}
- MOCK_METHOD1(Init, void(ChromotocolConnection* connection));
+ MOCK_METHOD1(Init, void(Session* session));
MOCK_METHOD0(video_stub, VideoStub*());
+ MOCK_METHOD0(client_stub, ClientStub*());
+ MOCK_METHOD0(session, Session*());
MOCK_METHOD0(Disconnect, void());
private:
@@ -78,6 +82,31 @@ class MockVideoStub : public VideoStub {
DISALLOW_COPY_AND_ASSIGN(MockVideoStub);
};
+class MockSession : public Session {
+ public:
+ MockSession() {}
+
+ MOCK_METHOD1(SetStateChangeCallback, void(StateChangeCallback* callback));
+ MOCK_METHOD0(control_channel, net::Socket*());
+ MOCK_METHOD0(event_channel, net::Socket*());
+ MOCK_METHOD0(video_channel, net::Socket*());
+ MOCK_METHOD0(video_rtp_channel, net::Socket*());
+ MOCK_METHOD0(video_rtcp_channel, net::Socket*());
+ MOCK_METHOD0(jid, const std::string&());
+ MOCK_METHOD0(message_loop, MessageLoop*());
+ MOCK_METHOD0(candidate_config, const CandidateSessionConfig*());
+ MOCK_METHOD0(config, const SessionConfig*());
+ MOCK_METHOD1(set_config, void(const SessionConfig* config));
+ MOCK_METHOD0(initiator_token, const std::string&());
+ MOCK_METHOD1(set_initiator_token, void(const std::string& initiator_token));
+ MOCK_METHOD0(receiver_token, const std::string&());
+ MOCK_METHOD1(set_receiver_token, void(const std::string& receiver_token));
+ MOCK_METHOD1(Close, void(Task* closed_task));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSession);
+};
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698