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

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

Issue 337723003: Pull out stream/session updates from OnConfigNegotiated. Preparation for (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_session.cc ('k') | no next file » | 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 if (version() < QUIC_VERSION_17) { 653 if (version() < QUIC_VERSION_17) {
654 return; 654 return;
655 } 655 }
656 ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true); 656 ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true);
657 657
658 uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1; 658 uint32 kInvalidWindow = kDefaultFlowControlSendWindow - 1;
659 QuicConfigPeer::SetReceivedInitialFlowControlWindow(session_.config(), 659 QuicConfigPeer::SetReceivedInitialFlowControlWindow(session_.config(),
660 kInvalidWindow); 660 kInvalidWindow);
661 661
662 EXPECT_CALL(*connection_, 662 EXPECT_CALL(*connection_,
663 SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW)); 663 SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW)).Times(2);
664 session_.OnConfigNegotiated(); 664 session_.OnConfigNegotiated();
665 } 665 }
666 666
667 TEST_P(QuicSessionTest, ConnectionFlowControlAccountingRstOutOfOrder) { 667 TEST_P(QuicSessionTest, ConnectionFlowControlAccountingRstOutOfOrder) {
668 if (version() < QUIC_VERSION_19) { 668 if (version() < QUIC_VERSION_19) {
669 return; 669 return;
670 } 670 }
671 671
672 ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true); 672 ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
673 ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true); 673 ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 863
864 // Version 16 means all flow control is disabled. 864 // Version 16 means all flow control is disabled.
865 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); 865 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16);
866 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); 866 EXPECT_FALSE(session_.flow_controller()->IsEnabled());
867 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); 867 EXPECT_FALSE(stream->flow_controller()->IsEnabled());
868 } 868 }
869 869
870 } // namespace 870 } // namespace
871 } // namespace test 871 } // namespace test
872 } // namespace net 872 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698