| 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 #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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 std::string HexDumpWithMarks(const unsigned char* data, int length, | 30 std::string HexDumpWithMarks(const unsigned char* data, int length, |
| 31 const bool* marks, int mark_length); | 31 const bool* marks, int mark_length); |
| 32 | 32 |
| 33 void CompareCharArraysWithHexError( | 33 void CompareCharArraysWithHexError( |
| 34 const std::string& description, | 34 const std::string& description, |
| 35 const unsigned char* actual, | 35 const unsigned char* actual, |
| 36 const int actual_len, | 36 const int actual_len, |
| 37 const unsigned char* expected, | 37 const unsigned char* expected, |
| 38 const int expected_len); | 38 const int expected_len); |
| 39 | 39 |
| 40 void SetFrameFlags(SpdyFrame* frame, | 40 void SetFrameFlags(SpdySerializedFrame* frame, |
| 41 uint8_t flags, | 41 uint8_t flags, |
| 42 SpdyMajorVersion spdy_version); | 42 SpdyMajorVersion spdy_version); |
| 43 | 43 |
| 44 void SetFrameLength(SpdyFrame* frame, | 44 void SetFrameLength(SpdySerializedFrame* frame, |
| 45 size_t length, | 45 size_t length, |
| 46 SpdyMajorVersion spdy_version); | 46 SpdyMajorVersion spdy_version); |
| 47 | 47 |
| 48 std::string a2b_hex(const char* hex_data); | 48 std::string a2b_hex(const char* hex_data); |
| 49 | 49 |
| 50 // Returns a SHA1 HashValue in which each byte has the value |label|. | 50 // Returns a SHA1 HashValue in which each byte has the value |label|. |
| 51 HashValue GetTestHashValue(uint8_t label); | 51 HashValue GetTestHashValue(uint8_t label); |
| 52 | 52 |
| 53 // Returns SHA1 pinning header for the of the base64 encoding of | 53 // Returns SHA1 pinning header for the of the base64 encoding of |
| 54 // GetTestHashValue(|label|). | 54 // GetTestHashValue(|label|). |
| (...skipping 24 matching lines...) Expand all Loading... |
| 79 SpdyHeaderBlock block_; | 79 SpdyHeaderBlock block_; |
| 80 size_t header_bytes_parsed_; | 80 size_t header_bytes_parsed_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(TestHeadersHandler); | 82 DISALLOW_COPY_AND_ASSIGN(TestHeadersHandler); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace test | 85 } // namespace test |
| 86 } // namespace net | 86 } // namespace net |
| 87 | 87 |
| 88 #endif // NET_SPDY_TEST_UTILS_H_ | 88 #endif // NET_SPDY_TEST_UTILS_H_ |
| OLD | NEW |