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

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

Issue 54043003: Remove some duplicate code in quic tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a "u" to constant to prevent signed/unsigned warning Created 7 years, 1 month 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
« no previous file with comments | « net/quic/crypto/channel_id_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 <string> 10 #include <string>
(...skipping 19 matching lines...) Expand all
30 30
31 // Lower limit on versions we support. 31 // Lower limit on versions we support.
32 QuicVersion QuicVersionMin(); 32 QuicVersion QuicVersionMin();
33 33
34 void CompareCharArraysWithHexError(const std::string& description, 34 void CompareCharArraysWithHexError(const std::string& description,
35 const char* actual, 35 const char* actual,
36 const int actual_len, 36 const int actual_len,
37 const char* expected, 37 const char* expected,
38 const int expected_len); 38 const int expected_len);
39 39
40 bool DecodeHexString(const base::StringPiece& hex, std::string* bytes);
41
40 // Returns the length of a QuicPacket that is capable of holding either a 42 // Returns the length of a QuicPacket that is capable of holding either a
41 // stream frame or a minimal ack frame. Sets |*payload_length| to the number 43 // stream frame or a minimal ack frame. Sets |*payload_length| to the number
42 // of bytes of stream data that will fit in such a packet. 44 // of bytes of stream data that will fit in such a packet.
43 size_t GetPacketLengthForOneStream( 45 size_t GetPacketLengthForOneStream(
44 QuicVersion version, 46 QuicVersion version,
45 bool include_version, 47 bool include_version,
46 QuicSequenceNumberLength sequence_number_length, 48 QuicSequenceNumberLength sequence_number_length,
47 InFecGroup is_in_fec_group, 49 InFecGroup is_in_fec_group,
48 size_t* payload_length); 50 size_t* payload_length);
49 51
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 MockAckNotifierDelegate(); 416 MockAckNotifierDelegate();
415 virtual ~MockAckNotifierDelegate(); 417 virtual ~MockAckNotifierDelegate();
416 418
417 MOCK_METHOD0(OnAckNotification, void()); 419 MOCK_METHOD0(OnAckNotification, void());
418 }; 420 };
419 421
420 } // namespace test 422 } // namespace test
421 } // namespace net 423 } // namespace net
422 424
423 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 425 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/channel_id_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