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

Unified Diff: net/quic/quic_session_test.cc

Issue 555143002: Fix bug where QUIC_VERSION_21 would stall after sending too many headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/quic_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session_test.cc
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index 787f6242f243f9ea1937be1e56062953094f5c98..a29192eba86b566d399a539bf81aefe12c67662f 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -905,6 +905,29 @@ TEST_P(QuicSessionTest, VersionNegotiationDisablesFlowControl) {
EXPECT_FALSE(stream->flow_controller()->IsEnabled());
}
+TEST_P(QuicSessionTest, WindowUpdateUnblocksHeadersStream) {
+ // Test that a flow control blocked headers stream gets unblocked on recipt of
+ // a WINDOW_UPDATE frame. Regression test for b/17413860.
+ if (version() < QUIC_VERSION_21) {
+ return;
+ }
+
+ // Set the headers stream to be flow control blocked.
+ QuicHeadersStream* headers_stream =
+ QuicSessionPeer::GetHeadersStream(&session_);
+ QuicFlowControllerPeer::SetSendWindowOffset(headers_stream->flow_controller(),
+ 0);
+ EXPECT_TRUE(headers_stream->flow_controller()->IsBlocked());
+
+ // Unblock the headers stream by supplying a WINDOW_UPDATE.
+ QuicWindowUpdateFrame window_update_frame(headers_stream->id(),
+ 2 * kDefaultFlowControlSendWindow);
+ vector<QuicWindowUpdateFrame> frames;
+ frames.push_back(window_update_frame);
+ session_.OnWindowUpdateFrames(frames);
+ EXPECT_FALSE(headers_stream->flow_controller()->IsBlocked());
+}
+
TEST_P(QuicSessionTest, TooManyUnfinishedStreamsCauseConnectionClose) {
if (version() < QUIC_VERSION_18) {
return;
« no previous file with comments | « net/quic/quic_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698