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

Unified Diff: net/tools/quic/quic_server_session_test.cc

Issue 1398403006: relnote: Create Quic version 28. The receiver refuses to create a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/tools/quic/end_to_end_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server_session_test.cc
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 7123496e907544e8b55fdb71a95f5109f1fc3713..d24b8378b451c8b15b8285f2ab98f70641c7e0be 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -189,9 +189,9 @@ TEST_P(QuicServerSessionTest, AcceptClosedStream) {
}
TEST_P(QuicServerSessionTest, MaxOpenStreams) {
- // Test that the server closes the connection if a client attempts to open too
- // many data streams. The server accepts slightly more than the negotiated
- // stream limit to deal with rare cases where a client FIN/RST is lost.
+ // Test that the server refuses if a client attempts to open too many data
+ // streams. The server accepts slightly more than the negotiated stream limit
+ // to deal with rare cases where a client FIN/RST is lost.
// The slightly increased stream limit is set during config negotiation. It
// is either an increase of 10 over negotiated limit, or a fixed percentage
@@ -220,8 +220,14 @@ TEST_P(QuicServerSessionTest, MaxOpenStreams) {
// Now violate the server's internal stream limit.
stream_id += 2;
- EXPECT_CALL(*connection_, SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS));
- EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(0);
+ if (connection_->version() <= QUIC_VERSION_27) {
+ EXPECT_CALL(*connection_, SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS));
+ EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(0);
+ } else {
+ EXPECT_CALL(*connection_, SendConnectionClose(_)).Times(0);
+ EXPECT_CALL(*connection_, SendRstStream(stream_id, QUIC_REFUSED_STREAM, 0));
+ }
+ // Even if the connection remains open, the stream creation should fail.
EXPECT_FALSE(QuicServerSessionPeer::GetIncomingDynamicStream(session_.get(),
stream_id));
}
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698