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

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

Issue 327393002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 6 years, 6 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 | Annotate | Revision Log
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 <string> 10 #include <string>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Testing convenience method to construct a QuicAckFrame with all packets 89 // Testing convenience method to construct a QuicAckFrame with all packets
90 // from least_unacked to largest_observed acked. 90 // from least_unacked to largest_observed acked.
91 QuicAckFrame MakeAckFrame(QuicPacketSequenceNumber largest_observed, 91 QuicAckFrame MakeAckFrame(QuicPacketSequenceNumber largest_observed,
92 QuicPacketSequenceNumber least_unacked); 92 QuicPacketSequenceNumber least_unacked);
93 93
94 // Testing convenience method to construct a QuicAckFrame with |num_nack_ranges| 94 // Testing convenience method to construct a QuicAckFrame with |num_nack_ranges|
95 // nack ranges of width 1 packet, starting from |least_unacked|. 95 // nack ranges of width 1 packet, starting from |least_unacked|.
96 QuicAckFrame MakeAckFrameWithNackRanges(size_t num_nack_ranges, 96 QuicAckFrame MakeAckFrameWithNackRanges(size_t num_nack_ranges,
97 QuicPacketSequenceNumber least_unacked); 97 QuicPacketSequenceNumber least_unacked);
98 98
99 // Returns a SerializedPacket whose |packet| member is owned by the caller, 99 // Returns a SerializedPacket whose |packet| member is owned by the caller, and
100 // and is populated with the fields in |header| and |frames|, or is NULL if 100 // is populated with the fields in |header| and |frames|, or is NULL if the
101 // the packet could not be created. 101 // packet could not be created.
102 SerializedPacket BuildUnsizedDataPacket(QuicFramer* framer, 102 SerializedPacket BuildUnsizedDataPacket(QuicFramer* framer,
103 const QuicPacketHeader& header, 103 const QuicPacketHeader& header,
104 const QuicFrames& frames); 104 const QuicFrames& frames);
105 105
106 template<typename SaveType> 106 template<typename SaveType>
107 class ValueRestore { 107 class ValueRestore {
108 public: 108 public:
109 ValueRestore(SaveType* name, SaveType value) 109 ValueRestore(SaveType* name, SaveType value)
110 : name_(name), 110 : name_(name),
111 value_(*name) { 111 value_(*name) {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 virtual ~MockAckNotifierDelegate(); 500 virtual ~MockAckNotifierDelegate();
501 501
502 private: 502 private:
503 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); 503 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate);
504 }; 504 };
505 505
506 } // namespace test 506 } // namespace test
507 } // namespace net 507 } // namespace net
508 508
509 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 509 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_stream_sequencer_peer.cc ('k') | net/quic/test_tools/simple_quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698