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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 MOCK_METHOD1(OnRttUpdated, void(QuicPacketNumber)); | 753 MOCK_METHOD1(OnRttUpdated, void(QuicPacketNumber)); |
754 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void)); | 754 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void)); |
755 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); | 755 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); |
756 MOCK_CONST_METHOD0(GetDebugState, std::string()); | 756 MOCK_CONST_METHOD0(GetDebugState, std::string()); |
757 MOCK_CONST_METHOD0(InSlowStart, bool()); | 757 MOCK_CONST_METHOD0(InSlowStart, bool()); |
758 MOCK_CONST_METHOD0(InRecovery, bool()); | 758 MOCK_CONST_METHOD0(InRecovery, bool()); |
759 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); | 759 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); |
760 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); | 760 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); |
761 MOCK_METHOD2(ResumeConnectionState, | 761 MOCK_METHOD2(ResumeConnectionState, |
762 void(const CachedNetworkParameters&, bool)); | 762 void(const CachedNetworkParameters&, bool)); |
| 763 MOCK_METHOD1(OnApplicationLimited, void(QuicByteCount)); |
763 | 764 |
764 private: | 765 private: |
765 DISALLOW_COPY_AND_ASSIGN(MockSendAlgorithm); | 766 DISALLOW_COPY_AND_ASSIGN(MockSendAlgorithm); |
766 }; | 767 }; |
767 | 768 |
768 class MockLossAlgorithm : public LossDetectionInterface { | 769 class MockLossAlgorithm : public LossDetectionInterface { |
769 public: | 770 public: |
770 MockLossAlgorithm(); | 771 MockLossAlgorithm(); |
771 ~MockLossAlgorithm() override; | 772 ~MockLossAlgorithm() override; |
772 | 773 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 MOCK_METHOD2(OnConnectionMigration, void(QuicPathId, PeerAddressChangeType)); | 948 MOCK_METHOD2(OnConnectionMigration, void(QuicPathId, PeerAddressChangeType)); |
948 MOCK_CONST_METHOD0(IsHandshakeConfirmed, bool(void)); | 949 MOCK_CONST_METHOD0(IsHandshakeConfirmed, bool(void)); |
949 MOCK_METHOD1(SetDebugDelegate, void(DebugDelegate*)); | 950 MOCK_METHOD1(SetDebugDelegate, void(DebugDelegate*)); |
950 MOCK_CONST_METHOD1(GetLargestObserved, QuicPacketNumber(QuicPathId)); | 951 MOCK_CONST_METHOD1(GetLargestObserved, QuicPacketNumber(QuicPathId)); |
951 MOCK_CONST_METHOD1(GetLargestSentPacket, QuicPacketNumber(QuicPathId)); | 952 MOCK_CONST_METHOD1(GetLargestSentPacket, QuicPacketNumber(QuicPathId)); |
952 MOCK_CONST_METHOD1(GetLeastPacketAwaitedByPeer, QuicPacketNumber(QuicPathId)); | 953 MOCK_CONST_METHOD1(GetLeastPacketAwaitedByPeer, QuicPacketNumber(QuicPathId)); |
953 MOCK_METHOD1(SetNetworkChangeVisitor, void(NetworkChangeVisitor*)); | 954 MOCK_METHOD1(SetNetworkChangeVisitor, void(NetworkChangeVisitor*)); |
954 MOCK_CONST_METHOD0(InSlowStart, bool(void)); | 955 MOCK_CONST_METHOD0(InSlowStart, bool(void)); |
955 MOCK_CONST_METHOD0(GetConsecutiveRtoCount, size_t(void)); | 956 MOCK_CONST_METHOD0(GetConsecutiveRtoCount, size_t(void)); |
956 MOCK_CONST_METHOD0(GetConsecutiveTlpCount, size_t(void)); | 957 MOCK_CONST_METHOD0(GetConsecutiveTlpCount, size_t(void)); |
| 958 MOCK_METHOD0(OnApplicationLimited, void(void)); |
957 }; | 959 }; |
958 | 960 |
959 class MockConnectionCloseDelegate | 961 class MockConnectionCloseDelegate |
960 : public QuicConnectionCloseDelegateInterface { | 962 : public QuicConnectionCloseDelegateInterface { |
961 public: | 963 public: |
962 MockConnectionCloseDelegate(); | 964 MockConnectionCloseDelegate(); |
963 ~MockConnectionCloseDelegate() override; | 965 ~MockConnectionCloseDelegate() override; |
964 | 966 |
965 MOCK_METHOD3(OnUnrecoverableError, | 967 MOCK_METHOD3(OnUnrecoverableError, |
966 void(QuicErrorCode, | 968 void(QuicErrorCode, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 TestQuicSpdyServerSession** server_session); | 1023 TestQuicSpdyServerSession** server_session); |
1022 | 1024 |
1023 // Helper to generate client side stream ids, generalizes | 1025 // Helper to generate client side stream ids, generalizes |
1024 // kClientDataStreamId1 etc. above. | 1026 // kClientDataStreamId1 etc. above. |
1025 QuicStreamId QuicClientDataStreamId(int i); | 1027 QuicStreamId QuicClientDataStreamId(int i); |
1026 | 1028 |
1027 } // namespace test | 1029 } // namespace test |
1028 } // namespace net | 1030 } // namespace net |
1029 | 1031 |
1030 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 1032 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |