| 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/http2/hpack/huffman/http2_hpack_huffman_decoder.h" | 5 #include "net/http2/hpack/huffman/http2_hpack_huffman_decoder.h" |
| 6 | 6 |
| 7 // Tests of HpackHuffmanDecoder and HuffmanBitBuffer. | 7 // Tests of HpackHuffmanDecoder and HuffmanBitBuffer. |
| 8 | 8 |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 14 #include "net/http2/decoder/decode_buffer.h" | 14 #include "net/http2/decoder/decode_buffer.h" |
| 15 #include "net/http2/decoder/decode_status.h" | 15 #include "net/http2/decoder/decode_status.h" |
| 16 #include "net/http2/tools/failure.h" | 16 #include "net/http2/tools/failure.h" |
| 17 #include "net/http2/tools/random_decoder_test.h" | 17 #include "net/http2/tools/random_decoder_test.h" |
| 18 #include "net/spdy/spdy_test_utils.h" | 18 #include "net/spdy/core/spdy_test_utils.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 using ::testing::AssertionResult; | 21 using ::testing::AssertionResult; |
| 22 using ::testing::AssertionSuccess; | 22 using ::testing::AssertionSuccess; |
| 23 using base::StringPiece; | 23 using base::StringPiece; |
| 24 using std::string; | 24 using std::string; |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 namespace test { | 27 namespace test { |
| 28 namespace { | 28 namespace { |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 decoder.Reset(); | 275 decoder.Reset(); |
| 276 EXPECT_TRUE(decoder.Decode(huffman_encoded, &buffer)) << decoder; | 276 EXPECT_TRUE(decoder.Decode(huffman_encoded, &buffer)) << decoder; |
| 277 EXPECT_TRUE(decoder.InputProperlyTerminated()) << decoder; | 277 EXPECT_TRUE(decoder.InputProperlyTerminated()) << decoder; |
| 278 EXPECT_EQ(buffer, plain_string); | 278 EXPECT_EQ(buffer, plain_string); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace | 282 } // namespace |
| 283 } // namespace test | 283 } // namespace test |
| 284 } // namespace net | 284 } // namespace net |
| OLD | NEW |