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

Unified Diff: remoting/host/chromoting_host_unittest.cc

Issue 10915264: [remoting_unittests] Moving the variable used to mock VideoFrameCapturer::size_most_recent() to the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | remoting/host/client_session_unittest.cc » ('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 e75a1cbb32f4b84e241eff2dbeb005c8bacde310..441147b67fbc0b4e85c7eb705fec26a169c92a6a 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -215,6 +215,11 @@ class ChromotingHostTest : public testing::Test {
protocol::CandidateSessionConfig::CreateDefault();
}
+ virtual void TearDown() OVERRIDE {
+ // Run the message loop to finish outstanding tasks.
+ message_loop_.Run();
simonmorris 2012/09/13 16:51:40 I'm not convinced the benefits of this exceed the
alexeypa (please no reviews) 2012/09/13 18:06:17 Done.
+ }
+
// Helper method to pretend a client is connected to ChromotingHost.
void SimulateClientConnection(int connection_index, bool authenticate,
bool reject) {
@@ -470,7 +475,6 @@ TEST_F(ChromotingHostTest, StartAndShutdown) {
host_->Start(xmpp_login_);
ShutdownHost();
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, Connect) {
@@ -485,7 +489,6 @@ TEST_F(ChromotingHostTest, Connect) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, true, false);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, RejectAuthenticatingClient) {
@@ -500,7 +503,6 @@ TEST_F(ChromotingHostTest, RejectAuthenticatingClient) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, true, true);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, AuthenticationFailed) {
@@ -511,7 +513,6 @@ TEST_F(ChromotingHostTest, AuthenticationFailed) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, false, false);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, Reconnect) {
@@ -537,7 +538,6 @@ TEST_F(ChromotingHostTest, Reconnect) {
SimulateClientConnection(0, true, false);
message_loop_.Run();
SimulateClientConnection(1, true, false);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, ConnectWhenAnotherClientIsConnected) {
@@ -561,7 +561,6 @@ TEST_F(ChromotingHostTest, ConnectWhenAnotherClientIsConnected) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, true, false);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, IncomingSessionDeclined) {
@@ -572,7 +571,6 @@ TEST_F(ChromotingHostTest, IncomingSessionDeclined) {
EXPECT_EQ(protocol::SessionManager::DECLINE, response);
ShutdownHost();
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, IncomingSessionIncompatible) {
@@ -591,7 +589,6 @@ TEST_F(ChromotingHostTest, IncomingSessionIncompatible) {
EXPECT_EQ(protocol::SessionManager::INCOMPATIBLE, response);
ShutdownHost();
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, IncomingSessionAccepted) {
@@ -614,7 +611,6 @@ TEST_F(ChromotingHostTest, IncomingSessionAccepted) {
EXPECT_EQ(protocol::SessionManager::ACCEPT, response);
ShutdownHost();
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, IncomingSessionOverload) {
@@ -640,7 +636,6 @@ TEST_F(ChromotingHostTest, IncomingSessionOverload) {
EXPECT_EQ(protocol::SessionManager::OVERLOAD, response);
ShutdownHost();
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, OnSessionRouteChange) {
@@ -661,7 +656,6 @@ TEST_F(ChromotingHostTest, OnSessionRouteChange) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, true, false);
- message_loop_.Run();
}
TEST_F(ChromotingHostTest, DisconnectAllClients) {
@@ -674,7 +668,6 @@ TEST_F(ChromotingHostTest, DisconnectAllClients) {
host_->Start(xmpp_login_);
SimulateClientConnection(0, true, false);
- message_loop_.Run();
}
} // namespace remoting
« no previous file with comments | « no previous file | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698