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

Unified Diff: remoting/protocol/connection_to_client_unittest.cc

Issue 11364031: remoting: Update calls froms RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/channel_multiplexer_unittest.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client_unittest.cc
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index 5638728f0a61f90f9c07fb141dbab120b877a774..a978e08a184182b5bab47293619c913eed2cdbd3 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -38,12 +38,12 @@ class ConnectionToClientTest : public testing::Test {
EXPECT_CALL(handler_, OnConnectionChannelsConnected(viewer_.get()));
session_->event_handler()->OnSessionStateChange(Session::CONNECTED);
session_->event_handler()->OnSessionStateChange(Session::AUTHENTICATED);
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
virtual void TearDown() OVERRIDE {
viewer_.reset();
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
MessageLoop message_loop_;
@@ -64,7 +64,7 @@ TEST_F(ConnectionToClientTest, SendUpdateStream) {
scoped_ptr<VideoPacket> packet(new VideoPacket());
viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
// Verify that something has been written.
// TODO(sergeyu): Verify that the correct data has been written.
@@ -75,7 +75,7 @@ TEST_F(ConnectionToClientTest, SendUpdateStream) {
// And then close the connection to ConnectionToClient.
viewer_->Disconnect();
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
@@ -88,18 +88,18 @@ TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
// The test will crash if data writer tries to write data to the
// channel socket.
// TODO(sergeyu): Use MockSession to verify that no data is written?
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
TEST_F(ConnectionToClientTest, StateChange) {
EXPECT_CALL(handler_, OnConnectionClosed(viewer_.get(), OK));
session_->event_handler()->OnSessionStateChange(Session::CLOSED);
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
EXPECT_CALL(handler_, OnConnectionClosed(viewer_.get(), SESSION_REJECTED));
session_->set_error(SESSION_REJECTED);
session_->event_handler()->OnSessionStateChange(Session::FAILED);
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
} // namespace protocol
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698