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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 TestStream* stream6 = session_.CreateOutgoingDynamicStream(kDefaultPriority); | 508 TestStream* stream6 = session_.CreateOutgoingDynamicStream(kDefaultPriority); |
509 | 509 |
510 session_.MarkConnectionLevelWriteBlocked(stream2->id()); | 510 session_.MarkConnectionLevelWriteBlocked(stream2->id()); |
511 session_.MarkConnectionLevelWriteBlocked(stream6->id()); | 511 session_.MarkConnectionLevelWriteBlocked(stream6->id()); |
512 session_.MarkConnectionLevelWriteBlocked(stream4->id()); | 512 session_.MarkConnectionLevelWriteBlocked(stream4->id()); |
513 | 513 |
514 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _)) | 514 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _)) |
515 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 515 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
516 EXPECT_CALL(*send_algorithm, GetCongestionWindow()) | 516 EXPECT_CALL(*send_algorithm, GetCongestionWindow()) |
517 .WillRepeatedly(Return(kMaxPacketSize * 10)); | 517 .WillRepeatedly(Return(kMaxPacketSize * 10)); |
| 518 EXPECT_CALL(*send_algorithm, InRecovery()).WillRepeatedly(Return(false)); |
518 EXPECT_CALL(*stream2, OnCanWrite()) | 519 EXPECT_CALL(*stream2, OnCanWrite()) |
519 .WillOnce(testing::IgnoreResult( | 520 .WillOnce(testing::IgnoreResult( |
520 Invoke(CreateFunctor(&TestSession::SendStreamData, | 521 Invoke(CreateFunctor(&TestSession::SendStreamData, |
521 base::Unretained(&session_), stream2)))); | 522 base::Unretained(&session_), stream2)))); |
522 EXPECT_CALL(*stream4, OnCanWrite()) | 523 EXPECT_CALL(*stream4, OnCanWrite()) |
523 .WillOnce(testing::IgnoreResult( | 524 .WillOnce(testing::IgnoreResult( |
524 Invoke(CreateFunctor(&TestSession::SendStreamData, | 525 Invoke(CreateFunctor(&TestSession::SendStreamData, |
525 base::Unretained(&session_), stream4)))); | 526 base::Unretained(&session_), stream4)))); |
526 EXPECT_CALL(*stream6, OnCanWrite()) | 527 EXPECT_CALL(*stream6, OnCanWrite()) |
527 .WillOnce(testing::IgnoreResult( | 528 .WillOnce(testing::IgnoreResult( |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 if (version() <= QUIC_VERSION_35) { | 1254 if (version() <= QUIC_VERSION_35) { |
1254 EXPECT_FALSE(session_.force_hol_blocking()); | 1255 EXPECT_FALSE(session_.force_hol_blocking()); |
1255 } else { | 1256 } else { |
1256 EXPECT_TRUE(session_.force_hol_blocking()); | 1257 EXPECT_TRUE(session_.force_hol_blocking()); |
1257 } | 1258 } |
1258 } | 1259 } |
1259 | 1260 |
1260 } // namespace | 1261 } // namespace |
1261 } // namespace test | 1262 } // namespace test |
1262 } // namespace net | 1263 } // namespace net |
OLD | NEW |