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

Unified Diff: remoting/host/client_session_unittest.cc

Issue 7867019: Access Session::config() and Session::jid() on the correct thread only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 3 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/host/client_session.cc ('k') | remoting/host/heartbeat_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index fca7cd29369438471db808cb86a2e63bd0c0e164..07b2e923c4d5ae39f9d9f9a9fe83160a570c2b5c 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -23,19 +23,27 @@ using protocol::MockConnectionToClient;
using protocol::MockConnectionToClientEventHandler;
using protocol::MockHostStub;
using protocol::MockInputStub;
+using protocol::MockSession;
using testing::_;
using testing::DeleteArg;
using testing::InSequence;
using testing::Return;
+using testing::ReturnRef;
class ClientSessionTest : public testing::Test {
public:
ClientSessionTest() {}
virtual void SetUp() {
+ client_jid_ = "user@domain/rest-of-jid";
+ EXPECT_CALL(session_, jid()).WillRepeatedly(ReturnRef(client_jid_));
+
connection_ = new MockConnectionToClient(
&connection_event_handler_, &host_stub_, &input_stub_);
+
+ EXPECT_CALL(*connection_, session()).WillRepeatedly(Return(&session_));
+
user_authenticator_ = new MockUserAuthenticator();
client_session_ = new ClientSession(
&session_event_handler_,
@@ -49,6 +57,8 @@ class ClientSessionTest : public testing::Test {
protected:
MessageLoop message_loop_;
+ std::string client_jid_;
+ MockSession session_;
MockConnectionToClientEventHandler connection_event_handler_;
MockHostStub host_stub_;
MockInputStub input_stub_;
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/heartbeat_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698