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/core/quic_session.h" | 5 #include "net/quic/core/quic_session.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr" | 242 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr" |
243 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo "; | 243 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo "; |
244 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); | 244 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); |
245 // TODO(ianswett): Fix QuicSessionTests so they don't attempt to write | 245 // TODO(ianswett): Fix QuicSessionTests so they don't attempt to write |
246 // non-crypto stream data at ENCRYPTION_NONE. | 246 // non-crypto stream data at ENCRYPTION_NONE. |
247 FLAGS_quic_never_write_unencrypted_data = false; | 247 FLAGS_quic_never_write_unencrypted_data = false; |
248 } | 248 } |
249 | 249 |
250 void CheckClosedStreams() { | 250 void CheckClosedStreams() { |
251 for (QuicStreamId i = kCryptoStreamId; i < 100; i++) { | 251 for (QuicStreamId i = kCryptoStreamId; i < 100; i++) { |
252 if (!ContainsKey(closed_streams_, i)) { | 252 if (!base::ContainsKey(closed_streams_, i)) { |
253 EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i; | 253 EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i; |
254 } else { | 254 } else { |
255 EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i; | 255 EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i; |
256 } | 256 } |
257 } | 257 } |
258 } | 258 } |
259 | 259 |
260 void CloseStream(QuicStreamId id) { | 260 void CloseStream(QuicStreamId id) { |
261 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); | 261 EXPECT_CALL(*connection_, SendRstStream(id, _, _)); |
262 session_.CloseStream(id); | 262 session_.CloseStream(id); |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 if (version() <= QUIC_VERSION_35) { | 1201 if (version() <= QUIC_VERSION_35) { |
1202 EXPECT_FALSE(session_.force_hol_blocking()); | 1202 EXPECT_FALSE(session_.force_hol_blocking()); |
1203 } else { | 1203 } else { |
1204 EXPECT_TRUE(session_.force_hol_blocking()); | 1204 EXPECT_TRUE(session_.force_hol_blocking()); |
1205 } | 1205 } |
1206 } | 1206 } |
1207 | 1207 |
1208 } // namespace | 1208 } // namespace |
1209 } // namespace test | 1209 } // namespace test |
1210 } // namespace net | 1210 } // namespace net |
OLD | NEW |