Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: net/quic/quic_spdy_decompressor_test.cc

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_spdy_decompressor.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_spdy_decompressor_test.cc
diff --git a/net/quic/quic_spdy_decompressor_test.cc b/net/quic/quic_spdy_decompressor_test.cc
index b2fbb37b51db5c9c99adbccfcb95686584a4361b..1e6339691fa182ab96f486c3c8a26982132322b0 100644
--- a/net/quic/quic_spdy_decompressor_test.cc
+++ b/net/quic/quic_spdy_decompressor_test.cc
@@ -52,6 +52,22 @@ TEST_F(QuicSpdyDecompressorTest, DecompressAndIgnoreTrailingData) {
EXPECT_EQ(SpdyUtils::SerializeUncompressedHeaders(headers), visitor_.data());
}
+TEST_F(QuicSpdyDecompressorTest, DecompressError) {
+ SpdyHeaderBlock headers;
+ headers[":host"] = "www.google.com";
+ headers[":path"] = "/index.hml";
+ headers[":scheme"] = "https";
+
+ EXPECT_EQ(1u, decompressor_.current_header_id());
+ string compressed_headers = compressor_.CompressHeaders(headers).substr(4);
+ compressed_headers[compressed_headers.length() - 1] ^= 0x01;
+ EXPECT_NE(compressed_headers.length(),
+ decompressor_.DecompressData(compressed_headers, &visitor_));
+
+ EXPECT_TRUE(visitor_.error());
+ EXPECT_EQ("", visitor_.data());
+}
+
} // namespace
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/quic_spdy_decompressor.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698