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

Unified Diff: remoting/host/chromoting_host_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/chromoting_host.cc ('k') | remoting/host/client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index 120fb047742a611e55d18ad36ad121fe69fbf0ad..24e49b9f0f30a65eb4e4e9170bc86d07390f0a08 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -114,6 +114,7 @@ class ChromotingHostTest : public testing::Test {
session2_.reset(new MockSession());
session_config_ = SessionConfig::GetDefault();
session_jid_ = "user@domain/rest-of-jid";
+ session2_jid_ = "user2@domain/rest-of-jid";
session_config2_ = SessionConfig::GetDefault();
ON_CALL(video_stub_, ProcessVideoPacket(_, _))
@@ -136,10 +137,12 @@ class ChromotingHostTest : public testing::Test {
.WillByDefault(Return(session2_.get()));
ON_CALL(*session_.get(), config())
.WillByDefault(ReturnRef(session_config_));
- ON_CALL(*session_, jid())
- .WillByDefault(ReturnRef(session_jid_));
ON_CALL(*session2_.get(), config())
.WillByDefault(ReturnRef(session_config2_));
+ EXPECT_CALL(*session_, jid())
+ .WillRepeatedly(ReturnRef(session_jid_));
+ EXPECT_CALL(*session2_, jid())
+ .WillRepeatedly(ReturnRef(session2_jid_));
EXPECT_CALL(*connection_.get(), video_stub())
.Times(AnyNumber());
EXPECT_CALL(*connection_.get(), client_stub())
@@ -226,6 +229,7 @@ class ChromotingHostTest : public testing::Test {
MockClientStub client_stub_;
MockHostStub host_stub_;
scoped_refptr<MockConnectionToClient> connection2_;
+ std::string session2_jid_;
scoped_ptr<MockSession> session2_;
SessionConfig session_config2_;
MockVideoStub video_stub2_;
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698