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

Unified Diff: net/quic/quic_session_test.cc

Issue 198353003: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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') | net/quic/quic_utils.h » ('j') | 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 daf36ae1482a55386248a8a6b345bfe85171df06..54c6cbbb8e734cc0022d73f676908a28950747bf 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -427,15 +427,22 @@ TEST_P(QuicSessionTest, OnCanWriteWithClosedStream) {
}
TEST_P(QuicSessionTest, SendGoAway) {
- // After sending a GoAway, ensure new incoming streams cannot be created and
- // result in a RST being sent.
EXPECT_CALL(*connection_,
SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away."));
session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
EXPECT_TRUE(session_.goaway_sent());
- EXPECT_CALL(*connection_, SendRstStream(3u, QUIC_STREAM_PEER_GOING_AWAY, 0));
- EXPECT_FALSE(session_.GetIncomingDataStream(3u));
+ EXPECT_CALL(*connection_,
+ SendRstStream(3u, QUIC_STREAM_PEER_GOING_AWAY, 0)).Times(0);
+ EXPECT_TRUE(session_.GetIncomingDataStream(3u));
+}
+
+TEST_P(QuicSessionTest, DoNotSendGoAwayTwice) {
+ EXPECT_CALL(*connection_,
+ SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away.")).Times(1);
+ session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
+ EXPECT_TRUE(session_.goaway_sent());
+ session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
}
TEST_P(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) {
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698