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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 466 |
467 private: | 467 private: |
468 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); | 468 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); |
469 }; | 469 }; |
470 | 470 |
471 class MockSendAlgorithm : public SendAlgorithmInterface { | 471 class MockSendAlgorithm : public SendAlgorithmInterface { |
472 public: | 472 public: |
473 MockSendAlgorithm(); | 473 MockSendAlgorithm(); |
474 ~MockSendAlgorithm() override; | 474 ~MockSendAlgorithm() override; |
475 | 475 |
476 MOCK_METHOD3(SetFromConfig, | 476 MOCK_METHOD2(SetFromConfig, |
477 void(const QuicConfig& config, | 477 void(const QuicConfig& config, |
478 Perspective perspective, | 478 Perspective perspective)); |
479 bool using_pacing)); | |
480 MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections)); | 479 MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections)); |
481 MOCK_METHOD1(SetMaxCongestionWindow, | 480 MOCK_METHOD1(SetMaxCongestionWindow, |
482 void(QuicByteCount max_congestion_window)); | 481 void(QuicByteCount max_congestion_window)); |
483 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated, | 482 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated, |
484 QuicByteCount bytes_in_flight, | 483 QuicByteCount bytes_in_flight, |
485 const CongestionVector& acked_packets, | 484 const CongestionVector& acked_packets, |
486 const CongestionVector& lost_packets)); | 485 const CongestionVector& lost_packets)); |
487 MOCK_METHOD5(OnPacketSent, | 486 MOCK_METHOD5(OnPacketSent, |
488 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, | 487 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, |
489 QuicByteCount, HasRetransmittableData)); | 488 QuicByteCount, HasRetransmittableData)); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 void(const QuicVersionNegotiationPacket&)); | 664 void(const QuicVersionNegotiationPacket&)); |
666 | 665 |
667 MOCK_METHOD2(OnRevivedPacket, | 666 MOCK_METHOD2(OnRevivedPacket, |
668 void(const QuicPacketHeader&, StringPiece payload)); | 667 void(const QuicPacketHeader&, StringPiece payload)); |
669 }; | 668 }; |
670 | 669 |
671 } // namespace test | 670 } // namespace test |
672 } // namespace net | 671 } // namespace net |
673 | 672 |
674 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 673 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |