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

Unified Diff: net/tools/quic/quic_reliable_server_stream_test.cc

Issue 14651009: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix integer constant is too large for 'unsigned long' type 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/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_reliable_server_stream_test.cc
diff --git a/net/tools/quic/quic_reliable_server_stream_test.cc b/net/tools/quic/quic_reliable_server_stream_test.cc
index b1cf0327064d59d85226decb4b445d61c9f147f6..b946d94cfc3730ecc60b086a5fd17d641aafdd5c 100644
--- a/net/tools/quic/quic_reliable_server_stream_test.cc
+++ b/net/tools/quic/quic_reliable_server_stream_test.cc
@@ -5,6 +5,7 @@
#include "net/tools/quic/quic_reliable_server_stream.h"
#include "base/strings/string_number_conversions.h"
+#include "net/quic/quic_spdy_compressor.h"
#include "net/quic/quic_utils.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/tools/flip_server/epoll_server.h"
@@ -60,8 +61,18 @@ class QuicReliableServerStreamTest : public ::testing::Test {
QuicConsumedData ValidateHeaders(StringPiece headers) {
headers_string_ = SpdyUtils::SerializeResponseHeaders(
response_headers_);
-
- EXPECT_EQ(headers, headers_string_);
+ QuicSpdyDecompressor decompressor;
+ TestDecompressorVisitor visitor;
+
+ // First the header id, then the compressed data.
+ EXPECT_EQ(1, headers[0]);
+ EXPECT_EQ(0, headers[1]);
+ EXPECT_EQ(0, headers[2]);
+ EXPECT_EQ(0, headers[3]);
+ EXPECT_EQ(static_cast<size_t>(headers.length() - 4),
+ decompressor.DecompressData(headers.substr(4), &visitor));
+
+ EXPECT_EQ(headers_string_, visitor.data());
return QuicConsumedData(headers.size(), false);
}
« no previous file with comments | « net/quic/test_tools/simple_quic_framer.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698