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

Side by Side Diff: net/spdy/spdy_test_utils.h

Issue 1273743002: Add CompareSpdyHeaderBlocks() test helper method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/spdy/hpack/hpack_round_trip_test.cc ('k') | net/spdy/spdy_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 #ifndef NET_SPDY_TEST_UTILS_H_ 5 #ifndef NET_SPDY_TEST_UTILS_H_
6 #define NET_SPDY_TEST_UTILS_H_ 6 #define NET_SPDY_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 18 matching lines...) Expand all
29 const int expected_len); 29 const int expected_len);
30 30
31 void SetFrameFlags(SpdyFrame* frame, 31 void SetFrameFlags(SpdyFrame* frame,
32 uint8 flags, 32 uint8 flags,
33 SpdyMajorVersion spdy_version); 33 SpdyMajorVersion spdy_version);
34 34
35 void SetFrameLength(SpdyFrame* frame, 35 void SetFrameLength(SpdyFrame* frame,
36 size_t length, 36 size_t length,
37 SpdyMajorVersion spdy_version); 37 SpdyMajorVersion spdy_version);
38 38
39 // Returns true if |a| and |b| are the same size, and contain the same
40 // entries in the same positions.
41 bool CompareSpdyHeaderBlocks(const SpdyHeaderBlock& a,
42 const SpdyHeaderBlock& b);
43
39 std::string a2b_hex(const char* hex_data); 44 std::string a2b_hex(const char* hex_data);
40 45
41 // Returns a SHA1 HashValue in which each byte has the value |label|. 46 // Returns a SHA1 HashValue in which each byte has the value |label|.
42 HashValue GetTestHashValue(uint8_t label); 47 HashValue GetTestHashValue(uint8_t label);
43 48
44 // Returns SHA1 pinning header for the of the base64 encoding of 49 // Returns SHA1 pinning header for the of the base64 encoding of
45 // GetTestHashValue(|label|). 50 // GetTestHashValue(|label|).
46 std::string GetTestPin(uint8_t label); 51 std::string GetTestPin(uint8_t label);
47 52
48 // Adds a pin for |host| to |state|. 53 // Adds a pin for |host| to |state|.
49 void AddPin(TransportSecurityState* state, 54 void AddPin(TransportSecurityState* state,
50 const std::string& host, 55 const std::string& host,
51 uint8_t primary_label, 56 uint8_t primary_label,
52 uint8_t backup_label); 57 uint8_t backup_label);
53 58
54 } // namespace test 59 } // namespace test
55
56 } // namespace net 60 } // namespace net
57 61
58 #endif // NET_SPDY_TEST_UTILS_H_ 62 #endif // NET_SPDY_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/spdy/hpack/hpack_round_trip_test.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698