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

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

Issue 2915873003: This QUIC change includes: (Closed)
Patch Set: 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..6df385124f464e504fca021871faae42a3e7b0df 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -93,6 +93,7 @@ class TestStream : public QuicSpdyStream {
: QuicSpdyStream(id, session) {}
using QuicStream::CloseWriteSide;
+ using QuicStream::SetIsDeletable;
void OnDataAvailable() override {}
@@ -228,6 +229,8 @@ class TestSession : public QuicSpdySession {
}
using QuicSession::PostProcessAfterData;
+ using QuicSession::closed_streams;
+ using QuicSession::zombie_streams;
private:
StrictMock<TestCryptoStream> crypto_stream_;
@@ -1346,6 +1349,23 @@ TEST_P(QuicSessionTestClient, EnableFHOLThroughConfigOption) {
}
}
+TEST_P(QuicSessionTestServer, ZombieStreams) {
+ if (!session_.use_stream_notifier()) {
+ return;
+ }
+ TestStream* stream2 = session_.CreateOutgoingDynamicStream(kDefaultPriority);
+ stream2->SetIsDeletable(false);
+
+ EXPECT_CALL(*connection_, SendRstStream(2, _, _));
+ session_.CloseStream(2);
+ EXPECT_TRUE(ContainsKey(session_.zombie_streams(), 2));
+ EXPECT_TRUE(session_.closed_streams()->empty());
+ stream2->SetIsDeletable(true);
+ EXPECT_FALSE(ContainsKey(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