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

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

Issue 648933003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with TOT 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_server_session.cc ('k') | net/quic/quic_stream_factory.cc » ('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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 TEST_P(QuicSessionTest, DoNotSendGoAwayTwice) { 574 TEST_P(QuicSessionTest, DoNotSendGoAwayTwice) {
575 EXPECT_CALL(*connection_, 575 EXPECT_CALL(*connection_,
576 SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away.")).Times(1); 576 SendGoAway(QUIC_PEER_GOING_AWAY, 0u, "Going Away.")).Times(1);
577 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away."); 577 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
578 EXPECT_TRUE(session_.goaway_sent()); 578 EXPECT_TRUE(session_.goaway_sent());
579 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away."); 579 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
580 } 580 }
581 581
582 TEST_P(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) { 582 TEST_P(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) {
583 EXPECT_EQ((FLAGS_quic_unified_timeouts ? 583 EXPECT_EQ((FLAGS_quic_unified_timeouts ?
584 kInitialIdleTimeoutSecs : kDefaultIdleTimeoutSecs) + 1, 584 kInitialIdleTimeoutSecs : kDefaultIdleTimeoutSecs) + 3,
585 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 585 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
586 CryptoHandshakeMessage msg; 586 CryptoHandshakeMessage msg;
587 session_.GetCryptoStream()->OnHandshakeMessage(msg); 587 session_.GetCryptoStream()->OnHandshakeMessage(msg);
588 EXPECT_EQ(kMaximumIdleTimeoutSecs + 1, 588 EXPECT_EQ(kMaximumIdleTimeoutSecs + 3,
589 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds()); 589 QuicConnectionPeer::GetNetworkTimeout(connection_).ToSeconds());
590 } 590 }
591 591
592 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) { 592 TEST_P(QuicSessionTest, RstStreamBeforeHeadersDecompressed) {
593 // Send two bytes of payload. 593 // Send two bytes of payload.
594 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT")); 594 QuicStreamFrame data1(kClientDataStreamId1, false, 0, MakeIOVector("HT"));
595 vector<QuicStreamFrame> frames; 595 vector<QuicStreamFrame> frames;
596 frames.push_back(data1); 596 frames.push_back(data1);
597 session_.OnStreamFrames(frames); 597 session_.OnStreamFrames(frames);
598 EXPECT_EQ(1u, session_.GetNumOpenStreams()); 598 EXPECT_EQ(1u, session_.GetNumOpenStreams());
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 } 1025 }
1026 1026
1027 // Called after any new data is received by the session, and triggers the call 1027 // Called after any new data is received by the session, and triggers the call
1028 // to close the connection. 1028 // to close the connection.
1029 session_.PostProcessAfterData(); 1029 session_.PostProcessAfterData();
1030 } 1030 }
1031 1031
1032 } // namespace 1032 } // namespace
1033 } // namespace test 1033 } // namespace test
1034 } // namespace net 1034 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_server_session.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698