• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
6 #define QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
7 
8 #include <cstddef>
9 #include <cstdint>
10 #include <string>
11 
12 #include "absl/strings/string_view.h"
13 #include "quiche/spdy/core/http2_header_block.h"
14 #include "quiche/spdy/core/spdy_protocol.h"
15 
16 namespace spdy {
17 
18 inline bool operator==(absl::string_view x,
19                        const Http2HeaderBlock::ValueProxy& y) {
20   return y.operator==(x);
21 }
22 
23 namespace test {
24 
25 std::string HexDumpWithMarks(const unsigned char* data, int length,
26                              const bool* marks, int mark_length);
27 
28 void CompareCharArraysWithHexError(const std::string& description,
29                                    const unsigned char* actual,
30                                    const int actual_len,
31                                    const unsigned char* expected,
32                                    const int expected_len);
33 
34 void SetFrameFlags(SpdySerializedFrame* frame, uint8_t flags);
35 
36 void SetFrameLength(SpdySerializedFrame* frame, size_t length);
37 
38 }  // namespace test
39 }  // namespace spdy
40 
41 #endif  // QUICHE_SPDY_TEST_TOOLS_SPDY_TEST_UTILS_H_
42