OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "net/spdy/hpack/hpack_huffman_decoder.h" | 5 #include "net/spdy/core/hpack/hpack_huffman_decoder.h" |
6 | 6 |
7 #include <bitset> | 7 #include <bitset> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
13 #include "net/spdy/hpack/hpack_constants.h" | 13 #include "net/spdy/core/hpack/hpack_constants.h" |
14 #include "net/spdy/hpack/hpack_huffman_table.h" | 14 #include "net/spdy/core/hpack/hpack_huffman_table.h" |
15 #include "net/spdy/hpack/hpack_input_stream.h" | 15 #include "net/spdy/core/hpack/hpack_input_stream.h" |
16 #include "net/spdy/hpack/hpack_output_stream.h" | 16 #include "net/spdy/core/hpack/hpack_output_stream.h" |
| 17 #include "net/spdy/core/spdy_test_utils.h" |
17 #include "net/spdy/platform/api/spdy_string_piece.h" | 18 #include "net/spdy/platform/api/spdy_string_piece.h" |
18 #include "net/spdy/spdy_test_utils.h" | |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 namespace test { | 22 namespace test { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 uint32_t RandUint32() { | 26 uint32_t RandUint32() { |
27 return static_cast<uint32_t>(base::RandUint64() & 0xffffffff); | 27 return static_cast<uint32_t>(base::RandUint64() & 0xffffffff); |
28 } | 28 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 EncodeString(input, &encoded); | 247 EncodeString(input, &encoded); |
248 HpackInputStream input_stream(encoded); | 248 HpackInputStream input_stream(encoded); |
249 EXPECT_TRUE(HpackHuffmanDecoder::DecodeString(&input_stream, &decoded)); | 249 EXPECT_TRUE(HpackHuffmanDecoder::DecodeString(&input_stream, &decoded)); |
250 EXPECT_EQ(input, decoded); | 250 EXPECT_EQ(input, decoded); |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 } // namespace test | 254 } // namespace test |
255 } // namespace net | 255 } // namespace net |
OLD | NEW |