| Index: net/spdy/hpack/hpack_decoder_test.cc
|
| diff --git a/net/spdy/hpack/hpack_decoder_test.cc b/net/spdy/hpack/hpack_decoder_test.cc
|
| index 9f4c5fb8554b32a3f92deb09462cf584aa72240a..92f3515a810d2a7dca6bc7c6b69afd3519eaf622 100644
|
| --- a/net/spdy/hpack/hpack_decoder_test.cc
|
| +++ b/net/spdy/hpack/hpack_decoder_test.cc
|
| @@ -61,8 +61,6 @@ using test::a2b_hex;
|
| using testing::ElementsAre;
|
| using testing::Pair;
|
|
|
| -const size_t kLiteralBound = 1024;
|
| -
|
| class HpackDecoderTest : public ::testing::TestWithParam<bool> {
|
| protected:
|
| HpackDecoderTest() : decoder_(), decoder_peer_(&decoder_) {}
|
| @@ -198,7 +196,7 @@ TEST_P(HpackDecoderTest, HandleHeaderRepresentation) {
|
|
|
| // Decoding an encoded name with a valid string literal should work.
|
| TEST_P(HpackDecoderTest, DecodeNextNameLiteral) {
|
| - HpackInputStream input_stream(kLiteralBound, StringPiece("\x00\x04name", 6));
|
| + HpackInputStream input_stream(StringPiece("\x00\x04name", 6));
|
|
|
| StringPiece string_piece;
|
| EXPECT_TRUE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -211,8 +209,7 @@ TEST_P(HpackDecoderTest, DecodeNextNameLiteral) {
|
|
|
| // Decoding an encoded name with an incomplete string literal.
|
| TEST_P(HpackDecoderTest, DecodeNextNameLiteralWithIncompleteHeader) {
|
| - HpackInputStream input_stream(kLiteralBound,
|
| - StringPiece("\x00\x04name\x00\x02g", 9));
|
| + HpackInputStream input_stream(StringPiece("\x00\x04name\x00\x02g", 9));
|
|
|
| StringPiece string_piece;
|
| EXPECT_TRUE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -228,7 +225,7 @@ TEST_P(HpackDecoderTest, DecodeNextNameLiteralWithIncompleteHeader) {
|
|
|
| TEST_P(HpackDecoderTest, DecodeNextNameLiteralWithHuffmanEncoding) {
|
| string input = a2b_hex("008825a849e95ba97d7f");
|
| - HpackInputStream input_stream(kLiteralBound, input);
|
| + HpackInputStream input_stream(input);
|
|
|
| StringPiece string_piece;
|
| EXPECT_TRUE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -246,7 +243,7 @@ TEST_P(HpackDecoderTest, DecodeNextNameLiteralWithIncompleteHuffmanEncoding) {
|
| // Put two copies of the same huffman encoding into input.
|
| string input = a2b_hex("008825a849e95ba97d7f008825a849e95ba97d7f");
|
| input.resize(input.size() - 1); // Remove the last byte.
|
| - HpackInputStream input_stream(kLiteralBound, input);
|
| + HpackInputStream input_stream(input);
|
|
|
| StringPiece string_piece;
|
| EXPECT_TRUE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -262,7 +259,7 @@ TEST_P(HpackDecoderTest, DecodeNextNameLiteralWithIncompleteHuffmanEncoding) {
|
|
|
| // Decoding an encoded name with a valid index should work.
|
| TEST_P(HpackDecoderTest, DecodeNextNameIndexed) {
|
| - HpackInputStream input_stream(kLiteralBound, "\x01");
|
| + HpackInputStream input_stream("\x01");
|
|
|
| StringPiece string_piece;
|
| EXPECT_TRUE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -276,7 +273,7 @@ TEST_P(HpackDecoderTest, DecodeNextNameIndexed) {
|
| // Decoding an encoded name with an invalid index should fail.
|
| TEST_P(HpackDecoderTest, DecodeNextNameInvalidIndex) {
|
| // One more than the number of static table entries.
|
| - HpackInputStream input_stream(kLiteralBound, "\x3e");
|
| + HpackInputStream input_stream("\x3e");
|
|
|
| StringPiece string_piece;
|
| EXPECT_FALSE(decoder_peer_.DecodeNextName(&input_stream, &string_piece));
|
| @@ -524,7 +521,7 @@ TEST_P(HpackDecoderTest, LiteralHeaderNeverIndexedInvalidNameIndex) {
|
| // Decode with incomplete string literal.
|
| TEST_P(HpackDecoderTest, StringLiteralIncomplete) {
|
| const char input[] = "\x0c/sample/path\x06:path2\x0e/sample/path/";
|
| - HpackInputStream input_stream(kLiteralBound, input);
|
| + HpackInputStream input_stream(input);
|
| StringPiece str;
|
| EXPECT_TRUE(
|
| decoder_peer_.DecodeNextStringLiteral(&input_stream, false, &str));
|
|
|