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

Side by Side Diff: net/quic/quic_session_test.cc

Issue 610073002: Change the pre-handshake idle timeout to 5s from 120s, and the default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_a_convenience_method_76423808
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_session.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 TEST_P(QuicSessionTest, DoNotSendGoAwayTwice) { 572 TEST_P(QuicSessionTest, DoNotSendGoAwayTwice) {
573 EXPECT_CALL(*connection_, 573 EXPECT_CALL(*connection_,
574 SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away.")).Times(1); 574 SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away.")).Times(1);
575 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away."); 575 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
576 EXPECT_TRUE(session_.goaway_sent()); 576 EXPECT_TRUE(session_.goaway_sent());
577 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away."); 577 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
578 } 578 }
579 579
580 TEST_P(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) { 580 TEST_P(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) {
581 // Add 1 to the connection timeout on the server side. 581 EXPECT_EQ((FLAGS_quic_unified_timeouts ?
582 EXPECT_EQ(kDefaultInitialTimeoutSecs + 1, 582 kInitialIdleTimeoutSecs : kDefaultIdleTimeoutSecs) + 1,
583 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 583 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
584 CryptoHandshakeMessage msg; 584 CryptoHandshakeMessage msg;
585 session_.GetCryptoStream()->OnHandshakeMessage(msg); 585 session_.GetCryptoStream()->OnHandshakeMessage(msg);
586 EXPECT_EQ(kMaximumIdleTimeoutSecs + 1, 586 EXPECT_EQ(kMaximumIdleTimeoutSecs + 1,
587 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 587 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
588 } 588 }
589 589
590 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) { 590 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) {
591 // Send two bytes of payload. 591 // Send two bytes of payload.
592 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT")); 592 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT"));
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 } 945 }
946 946
947 // Called after any new data is received by the session, and triggers the call 947 // Called after any new data is received by the session, and triggers the call
948 // to close the connection. 948 // to close the connection.
949 session_.PostProcessAfterData(); 949 session_.PostProcessAfterData();
950 } 950 }
951 951
952 } // namespace 952 } // namespace
953 } // namespace test 953 } // namespace test
954 } // namespace net 954 } // namespace net
OLDNEW
« 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