From fb578635ffff99206af1cf78f9c698a524a61479 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Thu, 1 Nov 2012 22:34:00 +0000 Subject: remoting: Update calls froms RunAllPending() to RunUntilIdle(). BUG=131220 TEST=remoting_unittests R=sergeyu@chromium.org,wez@chromium.org Review URL: https://chromiumcodereview.appspot.com/11364031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165528 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/protocol/connection_to_client_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '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 5638728..a978e08 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 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 -- cgit v1.1