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

Unified Diff: net/quic/core/quic_session_test.cc

Issue 2916033003: Landing Recent QUIC changes until 03:18 AM, May 28, UTC (Closed)
Patch Set: A few more EXPORTs. Created 3 years, 7 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/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_session_test.cc
diff --git a/net/quic/core/quic_session_test.cc b/net/quic/core/quic_session_test.cc
index a5025626fb99d3bf2a228eb55515006a4c0a4537..8a251a7d03d3541bdf85ce2c4dfd63c50020785f 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -228,6 +228,8 @@ class TestSession : public QuicSpdySession {
}
using QuicSession::PostProcessAfterData;
+ using QuicSession::closed_streams;
+ using QuicSession::zombie_streams;
private:
StrictMock<TestCryptoStream> crypto_stream_;
@@ -1346,6 +1348,24 @@ TEST_P(QuicSessionTestClient, EnableFHOLThroughConfigOption) {
}
}
+TEST_P(QuicSessionTestServer, ZombieStreams) {
+ if (!session_.use_stream_notifier()) {
+ return;
+ }
+ TestStream* stream2 = session_.CreateOutgoingDynamicStream(kDefaultPriority);
+ QuicStreamPeer::SetStreamBytesWritten(3, stream2);
+ EXPECT_TRUE(stream2->IsWaitingForAcks());
+
+ EXPECT_CALL(*connection_, SendRstStream(2, _, _));
+ session_.CloseStream(2);
+ EXPECT_TRUE(QuicContainsKey(session_.zombie_streams(), 2));
+ EXPECT_TRUE(session_.closed_streams()->empty());
+ session_.OnStreamDoneWaitingForAcks(2);
+ EXPECT_FALSE(QuicContainsKey(session_.zombie_streams(), 2));
+ EXPECT_EQ(1u, session_.closed_streams()->size());
+ EXPECT_EQ(2u, session_.closed_streams()->front()->id());
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698