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

Unified Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 2053133002: Remove MessageLoop::current()->RunUntilIdle() in net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_proxy_client_socket_unittest.cc
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 78c8ce5738d9ed722ea41430d0e6c3468a7dbd2d..a04c32519ea862d349b7b154cd09aa79bfe44092 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -192,7 +192,7 @@ void SpdyProxyClientSocketTest::TearDown() {
session_->spdy_session_pool()->CloseAllSessions();
// Empty the current queue.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
PlatformTest::TearDown();
}
@@ -485,7 +485,7 @@ TEST_P(SpdyProxyClientSocketTest, ConnectRedirects) {
ASSERT_EQ(location, kRedirectUrl);
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
TEST_P(SpdyProxyClientSocketTest, ConnectFails) {
@@ -532,7 +532,7 @@ TEST_P(SpdyProxyClientSocketTest, WasEverUsedReturnsCorrectValues) {
EXPECT_TRUE(sock_->WasEverUsed());
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// ----------- GetPeerAddress
@@ -1030,7 +1030,7 @@ TEST_P(SpdyProxyClientSocketTest,
sock_->Read(NULL, 1, CompletionCallback()));
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Reading buffered data from an already closed socket should return
@@ -1117,7 +1117,7 @@ TEST_P(SpdyProxyClientSocketTest, WriteOnDisconnectedSocket) {
sock_->Write(buf.get(), buf->size(), CompletionCallback()));
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// If the socket is closed with a pending Write(), the callback
@@ -1182,7 +1182,7 @@ TEST_P(SpdyProxyClientSocketTest, DisconnectWithWritePending) {
EXPECT_FALSE(write_callback_.have_result());
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// If the socket is Disconnected with a pending Read(), the callback
@@ -1216,7 +1216,7 @@ TEST_P(SpdyProxyClientSocketTest, DisconnectWithReadPending) {
EXPECT_FALSE(read_callback_.have_result());
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// If the socket is Reset when both a read and write are pending,
@@ -1258,7 +1258,7 @@ TEST_P(SpdyProxyClientSocketTest, RstWithReadAndWritePending) {
EXPECT_TRUE(write_callback_.have_result());
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Makes sure the proxy client socket's source gets the expected NetLog events
@@ -1317,7 +1317,7 @@ TEST_P(SpdyProxyClientSocketTest, NetLog) {
EXPECT_TRUE(LogContainsEndEvent(entry_list, 9, NetLog::TYPE_SOCKET_ALIVE));
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// CompletionCallback that causes the SpdyProxyClientSocket to be
@@ -1387,7 +1387,7 @@ TEST_P(SpdyProxyClientSocketTest, RstWithReadAndWritePendingDelete) {
EXPECT_FALSE(write_callback_.have_result());
// Let the RST_STREAM write while |rst| is in-scope.
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
} // namespace net
« no previous file with comments | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698