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

Unified Diff: remoting/host/log_to_server_unittest.cc

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 12 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/log_to_server.cc ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/log_to_server_unittest.cc
diff --git a/remoting/host/log_to_server_unittest.cc b/remoting/host/log_to_server_unittest.cc
index d67e76e6efe62f7772f37afa27e9c92a077e9b15..0749163104ed5b005935662e2782729db9315e5a 100644
--- a/remoting/host/log_to_server_unittest.cc
+++ b/remoting/host/log_to_server_unittest.cc
@@ -44,6 +44,8 @@ class LogToServerTest : public testing::Test {
TEST_F(LogToServerTest, SendNow) {
{
InSequence s;
+ EXPECT_CALL(signal_strategy_, GetLocalJid())
+ .WillRepeatedly(Return("host@domain.com/1234"));
EXPECT_CALL(signal_strategy_, AddListener(_));
EXPECT_CALL(signal_strategy_, GetNextId());
EXPECT_CALL(signal_strategy_, SendStanza(_))
@@ -52,8 +54,7 @@ TEST_F(LogToServerTest, SendNow) {
.WillOnce(QuitMainMessageLoop(&message_loop_))
.RetiresOnSaturation();
}
- log_to_server_->OnSignallingConnected(&signal_strategy_,
- "host@domain.com/1234");
+ log_to_server_->OnSignallingConnected(&signal_strategy_);
log_to_server_->OnClientAuthenticated("client@domain.com/5678");
log_to_server_->OnSignallingDisconnected();
message_loop_.Run();
@@ -62,6 +63,8 @@ TEST_F(LogToServerTest, SendNow) {
TEST_F(LogToServerTest, SendLater) {
{
InSequence s;
+ EXPECT_CALL(signal_strategy_, GetLocalJid())
+ .WillRepeatedly(Return("host@domain.com/1234"));
EXPECT_CALL(signal_strategy_, AddListener(_));
EXPECT_CALL(signal_strategy_, GetNextId());
EXPECT_CALL(signal_strategy_, SendStanza(_))
@@ -71,8 +74,7 @@ TEST_F(LogToServerTest, SendLater) {
.RetiresOnSaturation();
}
log_to_server_->OnClientAuthenticated("client@domain.com/5678");
- log_to_server_->OnSignallingConnected(&signal_strategy_,
- "host@domain.com/1234");
+ log_to_server_->OnSignallingConnected(&signal_strategy_);
log_to_server_->OnSignallingDisconnected();
message_loop_.Run();
}
@@ -80,6 +82,8 @@ TEST_F(LogToServerTest, SendLater) {
TEST_F(LogToServerTest, SendTwoEntriesLater) {
{
InSequence s;
+ EXPECT_CALL(signal_strategy_, GetLocalJid())
+ .WillRepeatedly(Return("host@domain.com/1234"));
EXPECT_CALL(signal_strategy_, AddListener(_));
EXPECT_CALL(signal_strategy_, GetNextId());
EXPECT_CALL(signal_strategy_, SendStanza(_))
@@ -90,8 +94,7 @@ TEST_F(LogToServerTest, SendTwoEntriesLater) {
}
log_to_server_->OnClientAuthenticated("client@domain.com/5678");
log_to_server_->OnClientAuthenticated("client2@domain.com/6789");
- log_to_server_->OnSignallingConnected(&signal_strategy_,
- "host@domain.com/1234");
+ log_to_server_->OnSignallingConnected(&signal_strategy_);
log_to_server_->OnSignallingDisconnected();
message_loop_.Run();
}
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698