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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Add 1 to the connection timeout on the server side. |
582 EXPECT_EQ(kDefaultInitialTimeoutSecs + 1, | 582 EXPECT_EQ(kDefaultInitialTimeoutSecs + 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(kDefaultTimeoutSecs + 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")); |
593 vector<QuicStreamFrame> frames; | 593 vector<QuicStreamFrame> frames; |
594 frames.push_back(data1); | 594 frames.push_back(data1); |
595 session_.OnStreamFrames(frames); | 595 session_.OnStreamFrames(frames); |
596 EXPECT_EQ(1u, session_.GetNumOpenStreams()); | 596 EXPECT_EQ(1u, session_.GetNumOpenStreams()); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 } | 957 } |
958 | 958 |
959 // Called after any new data is received by the session, and triggers the call | 959 // Called after any new data is received by the session, and triggers the call |
960 // to close the connection. | 960 // to close the connection. |
961 session_.PostProcessAfterData(); | 961 session_.PostProcessAfterData(); |
962 } | 962 } |
963 | 963 |
964 } // namespace | 964 } // namespace |
965 } // namespace test | 965 } // namespace test |
966 } // namespace net | 966 } // namespace net |
OLD | NEW |