| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |