OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |