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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
839 | 839 |
840 const uint64 kLargeOffset = kInitialFlowControlWindowForTest + 1; | 840 const uint64 kLargeOffset = kInitialFlowControlWindowForTest + 1; |
841 EXPECT_CALL(*connection_, | 841 EXPECT_CALL(*connection_, |
842 SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA)) | 842 SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA)) |
843 .Times(2); | 843 .Times(2); |
844 | 844 |
845 // Check that stream frame + FIN results in connection close. | 845 // Check that stream frame + FIN results in connection close. |
846 TestStream* stream = session_.CreateOutgoingDataStream(); | 846 TestStream* stream = session_.CreateOutgoingDataStream(); |
847 stream->Reset(QUIC_STREAM_CANCELLED); | 847 stream->Reset(QUIC_STREAM_CANCELLED); |
848 QuicStreamFrame frame(stream->id(), true, kLargeOffset, IOVector()); | 848 QuicStreamFrame frame(stream->id(), true, kLargeOffset, IOVector()); |
849 session_.OnStreamFrames({frame}); | 849 vector<QuicStreamFrame> frames; |
850 frames.push_back(frame); | |
851 session_.OnStreamFrames(frames); | |
Ryan Hamilton
2014/06/13 23:43:15
I was thinking about this change, too.
ramant (doing other things)
2014/06/14 00:05:28
I will port the above change back to internal code
Jana
2014/06/14 00:57:27
I don't think this change was part of the original
| |
850 | 852 |
851 // Check that RST results in connection close. | 853 // Check that RST results in connection close. |
852 QuicRstStreamFrame rst_frame(stream->id(), QUIC_STREAM_CANCELLED, | 854 QuicRstStreamFrame rst_frame(stream->id(), QUIC_STREAM_CANCELLED, |
853 kLargeOffset); | 855 kLargeOffset); |
854 session_.OnRstStream(rst_frame); | 856 session_.OnRstStream(rst_frame); |
855 } | 857 } |
856 | 858 |
857 TEST_P(QuicSessionTest, VersionNegotiationDisablesFlowControl) { | 859 TEST_P(QuicSessionTest, VersionNegotiationDisablesFlowControl) { |
858 ValueRestore<bool> old_stream_flag( | 860 ValueRestore<bool> old_stream_flag( |
859 &FLAGS_enable_quic_stream_flow_control_2, true); | 861 &FLAGS_enable_quic_stream_flow_control_2, true); |
(...skipping 19 matching lines...) Expand all Loading... | |
879 | 881 |
880 // Version 16 means all flow control is disabled. | 882 // Version 16 means all flow control is disabled. |
881 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); | 883 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16); |
882 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); | 884 EXPECT_FALSE(session_.flow_controller()->IsEnabled()); |
883 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); | 885 EXPECT_FALSE(stream->flow_controller()->IsEnabled()); |
884 } | 886 } |
885 | 887 |
886 } // namespace | 888 } // namespace |
887 } // namespace test | 889 } // namespace test |
888 } // namespace net | 890 } // namespace net |
OLD | NEW |