Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 1541263002: Landing Recent QUIC changes until 12/18/2015 13:57 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace -1 with 0xff for InvalidPathId Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 MOCK_METHOD1(OnPublicResetPacket, void(const QuicPublicResetPacket&)); 746 MOCK_METHOD1(OnPublicResetPacket, void(const QuicPublicResetPacket&));
747 747
748 MOCK_METHOD1(OnVersionNegotiationPacket, 748 MOCK_METHOD1(OnVersionNegotiationPacket,
749 void(const QuicVersionNegotiationPacket&)); 749 void(const QuicVersionNegotiationPacket&));
750 750
751 MOCK_METHOD2(OnRevivedPacket, 751 MOCK_METHOD2(OnRevivedPacket,
752 void(const QuicPacketHeader&, StringPiece payload)); 752 void(const QuicPacketHeader&, StringPiece payload));
753 }; 753 };
754 754
755 class MockReceivedPacketManager : public QuicReceivedPacketManager {
756 public:
757 explicit MockReceivedPacketManager(QuicConnectionStats* stats);
758 ~MockReceivedPacketManager() override;
759
760 MOCK_METHOD3(RecordPacketReceived,
761 void(QuicByteCount bytes,
762 const QuicPacketHeader& header,
763 QuicTime receipt_time));
764 MOCK_METHOD1(RecordPacketRevived, void(QuicPacketNumber packet_number));
765 MOCK_METHOD1(IsMissing, bool(QuicPacketNumber packet_number));
766 MOCK_METHOD1(IsAwaitingPacket, bool(QuicPacketNumber packet_number));
767 MOCK_METHOD1(UpdatePacketInformationSentByPeer,
768 void(const QuicStopWaitingFrame& stop_waiting));
769 MOCK_CONST_METHOD0(HasNewMissingPackets, bool(void));
770 MOCK_CONST_METHOD0(ack_frame_updated, bool(void));
771 };
772
755 // Creates a client session for testing. 773 // Creates a client session for testing.
756 // 774 //
757 // server_id: The server id associated with this stream. 775 // server_id: The server id associated with this stream.
758 // supports_stateless_rejects: Does this client support stateless rejects. 776 // supports_stateless_rejects: Does this client support stateless rejects.
759 // connection_start_time: The time to set for the connection clock. 777 // connection_start_time: The time to set for the connection clock.
760 // Needed for strike-register nonce verification. The client 778 // Needed for strike-register nonce verification. The client
761 // connection_start_time should be synchronized witht the server 779 // connection_start_time should be synchronized witht the server
762 // start time, otherwise nonce verification will fail. 780 // start time, otherwise nonce verification will fail.
763 // supported_versions: Set of QUIC versions this client supports. 781 // supported_versions: Set of QUIC versions this client supports.
764 // helper: Pointer to the MockConnectionHelper to use for the session. 782 // helper: Pointer to the MockConnectionHelper to use for the session.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 TestQuicSpdyServerSession** server_session); 819 TestQuicSpdyServerSession** server_session);
802 820
803 // Helper to generate client side stream ids, generalizes 821 // Helper to generate client side stream ids, generalizes
804 // kClientDataStreamId1 etc. above. 822 // kClientDataStreamId1 etc. above.
805 QuicStreamId QuicClientDataStreamId(int i); 823 QuicStreamId QuicClientDataStreamId(int i);
806 824
807 } // namespace test 825 } // namespace test
808 } // namespace net 826 } // namespace net
809 827
810 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 828 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698