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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 }; | 623 }; |
624 | 624 |
625 class MockLossAlgorithm : public LossDetectionInterface { | 625 class MockLossAlgorithm : public LossDetectionInterface { |
626 public: | 626 public: |
627 MockLossAlgorithm(); | 627 MockLossAlgorithm(); |
628 ~MockLossAlgorithm() override; | 628 ~MockLossAlgorithm() override; |
629 | 629 |
630 MOCK_CONST_METHOD0(GetLossDetectionType, LossDetectionType()); | 630 MOCK_CONST_METHOD0(GetLossDetectionType, LossDetectionType()); |
631 MOCK_METHOD4(DetectLosses, | 631 MOCK_METHOD4(DetectLosses, |
632 void(const QuicUnackedPacketMap& unacked_packets, | 632 void(const QuicUnackedPacketMap& unacked_packets, |
633 const QuicTime& time, | 633 QuicTime time, |
634 const RttStats& rtt_stats, | 634 const RttStats& rtt_stats, |
635 SendAlgorithmInterface::CongestionVector* packets_lost)); | 635 SendAlgorithmInterface::CongestionVector* packets_lost)); |
636 MOCK_CONST_METHOD0(GetLossTimeout, QuicTime()); | 636 MOCK_CONST_METHOD0(GetLossTimeout, QuicTime()); |
637 | 637 |
638 private: | 638 private: |
639 DISALLOW_COPY_AND_ASSIGN(MockLossAlgorithm); | 639 DISALLOW_COPY_AND_ASSIGN(MockLossAlgorithm); |
640 }; | 640 }; |
641 | 641 |
642 class TestEntropyCalculator | 642 class TestEntropyCalculator |
643 : public QuicReceivedEntropyHashCalculatorInterface { | 643 : public QuicReceivedEntropyHashCalculatorInterface { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 TestQuicSpdyServerSession** server_session); | 805 TestQuicSpdyServerSession** server_session); |
806 | 806 |
807 // Helper to generate client side stream ids, generalizes | 807 // Helper to generate client side stream ids, generalizes |
808 // kClientDataStreamId1 etc. above. | 808 // kClientDataStreamId1 etc. above. |
809 QuicStreamId QuicClientDataStreamId(int i); | 809 QuicStreamId QuicClientDataStreamId(int i); |
810 | 810 |
811 } // namespace test | 811 } // namespace test |
812 } // namespace net | 812 } // namespace net |
813 | 813 |
814 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 814 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |