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/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
6 | 6 |
7 #include "net/quic/quic_ack_notifier.h" | 7 #include "net/quic/quic_ack_notifier.h" |
8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" |
10 #include "net/quic/quic_write_blocked_list.h" | 10 #include "net/quic/quic_write_blocked_list.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 "ARHKyW-koxuhMZHUnGBJAM1gJODe0cATO_KGoX4pbbFxxJ5IicRxOrWK_5rU3cdy6" | 98 "ARHKyW-koxuhMZHUnGBJAM1gJODe0cATO_KGoX4pbbFxxJ5IicRxOrWK_5rU3cdy6" |
99 "edlR9FsEdH6iujMcHkbE5l18ehJDwTWmBKBzVD87naobhMMrF6VvnDGxQVGp9Ir_b" | 99 "edlR9FsEdH6iujMcHkbE5l18ehJDwTWmBKBzVD87naobhMMrF6VvnDGxQVGp9Ir_b" |
100 "Rgj3RWUoPumQVCxtSOBdX0GlJOEcDTNCzQIm9BSfetog_eP_TfYubKudt5eMsXmN6" | 100 "Rgj3RWUoPumQVCxtSOBdX0GlJOEcDTNCzQIm9BSfetog_eP_TfYubKudt5eMsXmN6" |
101 "QnyXHeGeK2UINUzJ-D30AFcpqYgH9_1BvYSpi7fc7_ydBU8TaD8ZRxvtnzXqj0RfG" | 101 "QnyXHeGeK2UINUzJ-D30AFcpqYgH9_1BvYSpi7fc7_ydBU8TaD8ZRxvtnzXqj0RfG" |
102 "tuHghmv3aD-uzSYJ75XDdzKdizZ86IG6Fbn1XFhYZM-fbHhm3mVEXnyRW4ZuNOLFk" | 102 "tuHghmv3aD-uzSYJ75XDdzKdizZ86IG6Fbn1XFhYZM-fbHhm3mVEXnyRW4ZuNOLFk" |
103 "Fas6LMcVC6Q8QLlHYbXBpdNFuGbuZGUnav5C-2I_-46lL0NGg3GewxGKGHvHEfoyn" | 103 "Fas6LMcVC6Q8QLlHYbXBpdNFuGbuZGUnav5C-2I_-46lL0NGg3GewxGKGHvHEfoyn" |
104 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr" | 104 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr" |
105 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo "; | 105 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo "; |
106 } | 106 } |
107 | 107 |
108 void set_supported_versions(const QuicVersionVector& versions) { | |
109 supported_versions_ = versions; | |
110 } | |
111 | |
112 void Initialize(bool stream_should_process_data) { | 108 void Initialize(bool stream_should_process_data) { |
113 connection_ = | 109 connection_ = |
114 new StrictMock<MockConnection>(kIsServer, supported_versions_); | 110 new StrictMock<MockConnection>(kIsServer, supported_versions_); |
115 session_.reset(new StrictMock<MockSession>(connection_)); | 111 session_.reset(new StrictMock<MockSession>(connection_)); |
116 | 112 |
117 // New streams rely on having the peer's flow control receive window | 113 // New streams rely on having the peer's flow control receive window |
118 // negotiated in the config. | 114 // negotiated in the config. |
119 QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( | 115 QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( |
120 session_->config(), initial_flow_control_window_bytes_); | 116 session_->config(), initial_flow_control_window_bytes_); |
121 | 117 |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 | 638 |
643 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); | 639 EXPECT_FALSE(stream_->HasFinalReceivedByteOffset()); |
644 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); | 640 QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234); |
645 stream_->OnStreamReset(rst_frame); | 641 stream_->OnStreamReset(rst_frame); |
646 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); | 642 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); |
647 } | 643 } |
648 | 644 |
649 } // namespace | 645 } // namespace |
650 } // namespace test | 646 } // namespace test |
651 } // namespace net | 647 } // namespace net |
OLD | NEW |