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

Unified Diff: net/quic/quic_chromium_client_stream_test.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/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_chromium_client_stream_test.cc
diff --git a/net/quic/quic_chromium_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc
index 88e4604b53a67ad38c9e30f229f019c9e7e514fb..87aa5c7ca12e0d6ecb7edc5e13c27586a7c48e0e 100644
--- a/net/quic/quic_chromium_client_stream_test.cc
+++ b/net/quic/quic_chromium_client_stream_test.cc
@@ -219,7 +219,7 @@ TEST_P(QuicChromiumClientStreamTest, OnFinRead) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(stream_->decompressed_headers().empty());
QuicStreamFrame frame2(kTestStreamId, true, offset, StringPiece());
@@ -243,7 +243,7 @@ TEST_P(QuicChromiumClientStreamTest, OnDataAvailable) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(stream_->decompressed_headers().empty());
const char data[] = "hello world!";
@@ -255,7 +255,7 @@ TEST_P(QuicChromiumClientStreamTest, OnDataAvailable) {
CreateFunctor(&QuicChromiumClientStreamTest::ReadData,
base::Unretained(this),
StringPiece(data, arraysize(data) - 1))));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
}
@@ -268,7 +268,7 @@ TEST_P(QuicChromiumClientStreamTest, ProcessHeadersWithError) {
stream_->OnStreamHeaders(StringPiece(bad_headers));
stream_->OnStreamHeadersComplete(false, bad_headers.length());
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
}
@@ -282,7 +282,7 @@ TEST_P(QuicChromiumClientStreamTest, OnDataAvailableWithError) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(stream_->decompressed_headers().empty());
const char data[] = "hello world!";
@@ -292,7 +292,7 @@ TEST_P(QuicChromiumClientStreamTest, OnDataAvailableWithError) {
.WillOnce(testing::Invoke(CreateFunctor(
&QuicChromiumClientStream::Reset,
base::Unretained(stream_), QUIC_STREAM_CANCELLED)));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
}
@@ -313,7 +313,7 @@ TEST_P(QuicChromiumClientStreamTest, OnTrailers) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(stream_->decompressed_headers().empty());
const char data[] = "hello world!";
@@ -346,7 +346,7 @@ TEST_P(QuicChromiumClientStreamTest, OnTrailers) {
// Make sure kFinalOffsetHeaderKey is gone from the delivered actual trailers.
trailers.erase(kFinalOffsetHeaderKey);
EXPECT_EQ(trailers, actual_trailers);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
}
@@ -361,7 +361,7 @@ TEST_P(QuicChromiumClientStreamTest, MarkTrailersConsumedWhenNotifyDelegate) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(stream_->decompressed_headers().empty());
const char data[] = "hello world!";
@@ -425,7 +425,7 @@ TEST_P(QuicChromiumClientStreamTest, MarkTrailersConsumedWhenNotifyDelegate) {
trailers.erase(kFinalOffsetHeaderKey);
EXPECT_EQ(trailers, actual_trailers);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
}
@@ -530,7 +530,7 @@ TEST_P(QuicChromiumClientStreamTest, HeadersBeforeDelegate) {
EXPECT_CALL(delegate_,
OnHeadersAvailable(headers_, uncompressed_headers.length()));
stream->SetDelegate(&delegate_);
- base::MessageLoop::current()->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// Times(2) because OnClose will be called for stream and stream_.
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)).Times(2);
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698