| Index: net/spdy/hpack_input_stream_test.cc
|
| diff --git a/net/spdy/hpack_input_stream_test.cc b/net/spdy/hpack_input_stream_test.cc
|
| index b54174565c6a7b430abfd31057642e44e274293b..38d6fffab1b96a93fa119847c92167074e067bc3 100644
|
| --- a/net/spdy/hpack_input_stream_test.cc
|
| +++ b/net/spdy/hpack_input_stream_test.cc
|
| @@ -32,14 +32,15 @@ class HpackInputStreamTest : public ::testing::Test {
|
| HpackHuffmanTable huffman_table;
|
| };
|
|
|
| -const char kEncodedFixture[] = "\x33" // Length prefix.
|
| - "\xc5\xad\xb7\x7f\x87\x6f\xc7\xfb\xf7\xfd\xbf\xbe\xbf\xf3\xf7\xf4"
|
| - "\xfb\x7e\xbb\xbe\x9f\x5f\x87\xe3\x7f\xef\xed\xfa\xee\xfa\x7c\x3f"
|
| - "\x1d\x5d\x1a\x23\xce\x54\x64\x36\xcd\x49\x4b\xd5\xd1\xcc\x5f\x05"
|
| - "\x35\x96\x9b";
|
| +const char kEncodedFixture[] =
|
| + "\x33" // Length prefix.
|
| + "\xc5\xad\xb7\x7f\x87\x6f\xc7\xfb\xf7\xfd\xbf\xbe\xbf\xf3\xf7\xf4"
|
| + "\xfb\x7e\xbb\xbe\x9f\x5f\x87\xe3\x7f\xef\xed\xfa\xee\xfa\x7c\x3f"
|
| + "\x1d\x5d\x1a\x23\xce\x54\x64\x36\xcd\x49\x4b\xd5\xd1\xcc\x5f\x05"
|
| + "\x35\x96\x9b";
|
|
|
| const char kDecodedFixture[] =
|
| - "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1";
|
| + "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1";
|
|
|
| // Utility function to decode an assumed-valid uint32 with an N-bit
|
| // prefix.
|
| @@ -514,8 +515,8 @@ TEST_F(HpackInputStreamTest, DecodeNextIdentityStringNotEnoughInput) {
|
| }
|
|
|
| TEST_F(HpackInputStreamTest, DecodeNextHuffmanString) {
|
| - string output, input(kEncodedFixture, arraysize(kEncodedFixture)-1);
|
| - HpackInputStream input_stream(arraysize(kDecodedFixture)-1, input);
|
| + string output, input(kEncodedFixture, arraysize(kEncodedFixture) - 1);
|
| + HpackInputStream input_stream(arraysize(kDecodedFixture) - 1, input);
|
|
|
| EXPECT_TRUE(input_stream.HasMoreData());
|
| EXPECT_TRUE(input_stream.DecodeNextHuffmanString(huffman_table, &output));
|
| @@ -524,9 +525,9 @@ TEST_F(HpackInputStreamTest, DecodeNextHuffmanString) {
|
| }
|
|
|
| TEST_F(HpackInputStreamTest, DecodeNextHuffmanStringSizeLimit) {
|
| - string output, input(kEncodedFixture, arraysize(kEncodedFixture)-1);
|
| + string output, input(kEncodedFixture, arraysize(kEncodedFixture) - 1);
|
| // Max string literal is one byte shorter than the decoded fixture.
|
| - HpackInputStream input_stream(arraysize(kDecodedFixture)-2, input);
|
| + HpackInputStream input_stream(arraysize(kDecodedFixture) - 2, input);
|
|
|
| // Decoded string overflows the max string literal.
|
| EXPECT_TRUE(input_stream.HasMoreData());
|
| @@ -534,9 +535,9 @@ TEST_F(HpackInputStreamTest, DecodeNextHuffmanStringSizeLimit) {
|
| }
|
|
|
| TEST_F(HpackInputStreamTest, DecodeNextHuffmanStringNotEnoughInput) {
|
| - string output, input(kEncodedFixture, arraysize(kEncodedFixture)-1);
|
| + string output, input(kEncodedFixture, arraysize(kEncodedFixture) - 1);
|
| input[0]++; // Input prefix is one byte larger than available input.
|
| - HpackInputStream input_stream(arraysize(kDecodedFixture)-1, input);
|
| + HpackInputStream input_stream(arraysize(kDecodedFixture) - 1, input);
|
|
|
| // Not enough buffer for declared encoded length.
|
| EXPECT_TRUE(input_stream.HasMoreData());
|
|
|