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 // Common utilities for Quic tests | 5 // Common utilities for Quic tests |
6 | 6 |
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 const CongestionVector& lost_packets)); | 451 const CongestionVector& lost_packets)); |
452 MOCK_METHOD5(OnPacketSent, | 452 MOCK_METHOD5(OnPacketSent, |
453 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, | 453 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, |
454 QuicByteCount, HasRetransmittableData)); | 454 QuicByteCount, HasRetransmittableData)); |
455 MOCK_METHOD1(OnRetransmissionTimeout, void(bool)); | 455 MOCK_METHOD1(OnRetransmissionTimeout, void(bool)); |
456 MOCK_METHOD0(RevertRetransmissionTimeout, void()); | 456 MOCK_METHOD0(RevertRetransmissionTimeout, void()); |
457 MOCK_CONST_METHOD3(TimeUntilSend, | 457 MOCK_CONST_METHOD3(TimeUntilSend, |
458 QuicTime::Delta(QuicTime now, | 458 QuicTime::Delta(QuicTime now, |
459 QuicByteCount bytes_in_flight, | 459 QuicByteCount bytes_in_flight, |
460 HasRetransmittableData)); | 460 HasRetransmittableData)); |
| 461 MOCK_CONST_METHOD0(PacingRate, QuicBandwidth(void)); |
461 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void)); | 462 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void)); |
462 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool()); | 463 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool()); |
463 MOCK_METHOD1(OnRttUpdated, void(QuicPacketSequenceNumber)); | 464 MOCK_METHOD1(OnRttUpdated, void(QuicPacketSequenceNumber)); |
464 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void)); | 465 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void)); |
465 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); | 466 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); |
466 MOCK_CONST_METHOD0(InSlowStart, bool()); | 467 MOCK_CONST_METHOD0(InSlowStart, bool()); |
467 MOCK_CONST_METHOD0(InRecovery, bool()); | 468 MOCK_CONST_METHOD0(InRecovery, bool()); |
468 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); | 469 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); |
469 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); | 470 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); |
470 | 471 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // clears the pointer to it to prevent use-after-free. | 583 // clears the pointer to it to prevent use-after-free. |
583 void Unregister(PerConnectionPacketWriter* writer); | 584 void Unregister(PerConnectionPacketWriter* writer); |
584 | 585 |
585 PerConnectionPacketWriter* current_writer_; | 586 PerConnectionPacketWriter* current_writer_; |
586 }; | 587 }; |
587 | 588 |
588 } // namespace test | 589 } // namespace test |
589 } // namespace net | 590 } // namespace net |
590 | 591 |
591 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 592 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |