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 |