Index: net/quic/quic_session_test.cc |
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc |
index 6d29f239f224f5abc1a39036063c18aee17972a0..e4b67b0331d0b4a572551b12974bd02414cb5468 100644 |
--- a/net/quic/quic_session_test.cc |
+++ b/net/quic/quic_session_test.cc |
@@ -969,36 +969,8 @@ TEST_P(QuicSessionTestServer, WindowUpdateUnblocksHeadersStream) { |
EXPECT_FALSE(session_.IsStreamFlowControlBlocked()); |
} |
-TEST_P(QuicSessionTestServer, TooManyUnfinishedStreamsCauseConnectionClose) { |
- FLAGS_quic_count_unfinished_as_open_streams = false; |
- // If a buggy/malicious peer creates too many streams that are not ended |
- // with a FIN or RST then we send a connection close. |
- EXPECT_CALL(*connection_, |
- SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS)); |
- |
- const QuicStreamId kMaxStreams = 5; |
- QuicSessionPeer::SetMaxOpenStreams(&session_, kMaxStreams); |
- |
- // Create kMaxStreams + 1 data streams, and close them all without receiving |
- // a FIN or a RST_STREAM from the client. |
- const QuicStreamId kFirstStreamId = kClientDataStreamId1; |
- const QuicStreamId kFinalStreamId = |
- kClientDataStreamId1 + 2 * kMaxStreams + 1; |
- for (QuicStreamId i = kFirstStreamId; i < kFinalStreamId; i += 2) { |
- QuicStreamFrame data1(i, false, 0, StringPiece("HT")); |
- session_.OnStreamFrame(data1); |
- EXPECT_EQ(1u, session_.GetNumOpenStreams()); |
- EXPECT_CALL(*connection_, SendRstStream(i, _, _)); |
- session_.CloseStream(i); |
- } |
- |
- // Called after any new data is received by the session, and triggers the |
- // call to close the connection. |
- session_.PostProcessAfterData(); |
-} |
- |
-TEST_P(QuicSessionTestServer, TooManyUnfinishedStreamsCauseServerRejectStream) { |
- FLAGS_quic_count_unfinished_as_open_streams = true; |
+TEST_P(QuicSessionTestServer, |
+ TooManyUnfinishedStreamsCauseServerRejectStream) { |
// If a buggy/malicious peer creates too many streams that are not ended |
// with a FIN or RST then we send a connection close or an RST to |
// refuse streams. |
@@ -1038,20 +1010,13 @@ TEST_P(QuicSessionTestServer, DrainingStreamsDoNotCountAsOpened) { |
// Verify that a draining stream (which has received a FIN but not consumed |
// it) does not count against the open quota (because it is closed from the |
// protocol point of view). |
- if (FLAGS_quic_count_unfinished_as_open_streams) { |
- if (GetParam() <= QUIC_VERSION_27) { |
- EXPECT_CALL(*connection_, SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS)) |
- .Times(0); |
- } else { |
- EXPECT_CALL(*connection_, SendRstStream(_, QUIC_REFUSED_STREAM, _)) |
- .Times(0); |
- } |
+ if (GetParam() <= QUIC_VERSION_27) { |
+ EXPECT_CALL(*connection_, |
+ SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS)).Times(0); |
} else { |
EXPECT_CALL(*connection_, |
- SendConnectionClose(QUIC_TOO_MANY_UNFINISHED_STREAMS)) |
- .Times(0); |
+ SendRstStream(_, QUIC_REFUSED_STREAM, _)).Times(0); |
} |
- |
const QuicStreamId kMaxStreams = 5; |
QuicSessionPeer::SetMaxOpenStreams(&session_, kMaxStreams); |