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

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

Issue 476023002: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0814_2
Patch Set: Created 6 years, 4 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.h ('k') | net/quic/quic_sustained_bandwidth_recorder.h » ('j') | 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 EXPECT_EQ(kDefaultInitialTimeoutSecs, 581 // Add 1 to the connection timeout on the server side.
582 EXPECT_EQ(kDefaultInitialTimeoutSecs + 1,
582 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 583 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
583 CryptoHandshakeMessage msg; 584 CryptoHandshakeMessage msg;
584 session_.GetCryptoStream()->OnHandshakeMessage(msg); 585 session_.GetCryptoStream()->OnHandshakeMessage(msg);
585 EXPECT_EQ(kDefaultTimeoutSecs, 586 EXPECT_EQ(kDefaultTimeoutSecs + 1,
586 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 587 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
587 } 588 }
588 589
589 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) { 590 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) {
590 // Send two bytes of payload. 591 // Send two bytes of payload.
591 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT")); 592 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT"));
592 vector<QuicStreamFrame> frames; 593 vector<QuicStreamFrame> frames;
593 frames.push_back(data1); 594 frames.push_back(data1);
594 session_.OnStreamFrames(frames); 595 session_.OnStreamFrames(frames);
595 EXPECT_EQ(1u, session_.GetNumOpenStreams()); 596 EXPECT_EQ(1u, session_.GetNumOpenStreams());
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 frames.push_back(data1); 930 frames.push_back(data1);
930 session_.OnStreamFrames(frames); 931 session_.OnStreamFrames(frames);
931 EXPECT_EQ(1u, session_.GetNumOpenStreams()); 932 EXPECT_EQ(1u, session_.GetNumOpenStreams());
932 session_.CloseStream(i); 933 session_.CloseStream(i);
933 } 934 }
934 } 935 }
935 936
936 } // namespace 937 } // namespace
937 } // namespace test 938 } // namespace test
938 } // namespace net 939 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_sustained_bandwidth_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698