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

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

Issue 1548783002: Adding details to most quic connection close calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110540464
Patch Set: Created 5 years 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/quic_server_session.cc ('k') | net/tools/quic/quic_simple_server_stream.cc » ('j') | 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 33c8a640e88e83af5143a1478a5523bab9c19ebf..9d47e6be49fccbf189bd93a8feedb0a0d83973ad 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -232,10 +232,11 @@ TEST_P(QuicServerSessionTest, MaxOpenStreams) {
// Now violate the server's internal stream limit.
stream_id += 2;
if (connection_->version() <= QUIC_VERSION_27) {
- EXPECT_CALL(*connection_, SendConnectionClose(QUIC_TOO_MANY_OPEN_STREAMS));
+ EXPECT_CALL(*connection_,
+ SendConnectionCloseWithDetails(QUIC_TOO_MANY_OPEN_STREAMS, _));
EXPECT_CALL(*connection_, SendRstStream(_, _, _)).Times(0);
} else {
- EXPECT_CALL(*connection_, SendConnectionClose(_)).Times(0);
+ EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(_, _)).Times(0);
EXPECT_CALL(*connection_, SendRstStream(stream_id, QUIC_REFUSED_STREAM, 0));
}
// Even if the connection remains open, the stream creation should fail.
@@ -269,8 +270,8 @@ TEST_P(QuicServerSessionTest, MaxAvailableStreams) {
session_.get(), kLimitingStreamId));
// A further available stream will result in connection close.
- EXPECT_CALL(*connection_,
- SendConnectionClose(QUIC_TOO_MANY_AVAILABLE_STREAMS));
+ EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
+ QUIC_TOO_MANY_AVAILABLE_STREAMS, _));
// This forces stream kLimitingStreamId + 2 to become available, which
// violates the quota.
EXPECT_FALSE(QuicServerSessionPeer::GetOrCreateDynamicStream(
@@ -279,7 +280,8 @@ TEST_P(QuicServerSessionTest, MaxAvailableStreams) {
TEST_P(QuicServerSessionTest, GetEvenIncomingError) {
// Incoming streams on the server session must be odd.
- EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID));
+ EXPECT_CALL(*connection_,
+ SendConnectionCloseWithDetails(QUIC_INVALID_STREAM_ID, _));
EXPECT_EQ(nullptr,
QuicServerSessionPeer::GetOrCreateDynamicStream(session_.get(), 4));
}
« no previous file with comments | « net/tools/quic/quic_server_session.cc ('k') | net/tools/quic/quic_simple_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698