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

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

Issue 651993003: QUIC - changes to keep chromium code and internal source tree in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_1011
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/tools/quic/quic_client_session_test.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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 TEST_P(QuicSessionTest, HandshakeUnblocksFlowControlBlockedCryptoStream) { 661 TEST_P(QuicSessionTest, HandshakeUnblocksFlowControlBlockedCryptoStream) {
662 if (version() <= QUIC_VERSION_19) { 662 if (version() <= QUIC_VERSION_19) {
663 return; 663 return;
664 } 664 }
665 // Test that if the crypto stream is flow control blocked, then if the SHLO 665 // Test that if the crypto stream is flow control blocked, then if the SHLO
666 // contains a larger send window offset, the stream becomes unblocked. 666 // contains a larger send window offset, the stream becomes unblocked.
667 session_.set_writev_consumes_all_data(true); 667 session_.set_writev_consumes_all_data(true);
668 TestCryptoStream* crypto_stream = session_.GetCryptoStream(); 668 TestCryptoStream* crypto_stream = session_.GetCryptoStream();
669 EXPECT_FALSE(crypto_stream->flow_controller()->IsBlocked()); 669 EXPECT_FALSE(crypto_stream->flow_controller()->IsBlocked());
670 QuicHeadersStream* headers_stream = 670 QuicHeadersStream* headers_stream =
671 QuicSessionPeer::GetHeadersStream(&session_); 671 QuicSessionPeer::GetHeadersStream(&session_);
672 EXPECT_FALSE(headers_stream->flow_controller()->IsBlocked()); 672 EXPECT_FALSE(headers_stream->flow_controller()->IsBlocked());
673 // Write until the crypto stream is flow control blocked. 673 // Write until the crypto stream is flow control blocked.
674 int i = 0; 674 int i = 0;
675 while (!crypto_stream->flow_controller()->IsBlocked() && i < 1000) { 675 while (!crypto_stream->flow_controller()->IsBlocked() && i < 1000) {
676 QuicConfig config; 676 QuicConfig config;
677 CryptoHandshakeMessage crypto_message; 677 CryptoHandshakeMessage crypto_message;
678 config.ToHandshakeMessage(&crypto_message); 678 config.ToHandshakeMessage(&crypto_message);
679 crypto_stream->SendHandshakeMessage(crypto_message); 679 crypto_stream->SendHandshakeMessage(crypto_message);
680 ++i; 680 ++i;
681 } 681 }
(...skipping 343 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/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698