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

Unified Diff: net/quic/quic_reliable_client_stream_test.cc

Issue 100173005: Break out the basic reliable QUIC stream functionality from the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_reliable_client_stream.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_reliable_client_stream_test.cc
diff --git a/net/quic/quic_reliable_client_stream_test.cc b/net/quic/quic_reliable_client_stream_test.cc
index 328dc87d58cf94b0b52b837146e34a98853224a1..8999d2635c8c78c2a58b97432e8b1a338b54312f 100644
--- a/net/quic/quic_reliable_client_stream_test.cc
+++ b/net/quic/quic_reliable_client_stream_test.cc
@@ -20,6 +20,8 @@ namespace net {
namespace test {
namespace {
+const QuicGuid kStreamId = 3;
+
class MockDelegate : public QuicReliableClientStream::Delegate {
public:
MockDelegate() {}
@@ -39,7 +41,7 @@ class QuicReliableClientStreamTest : public ::testing::Test {
public:
QuicReliableClientStreamTest()
: session_(new MockConnection(1, IPEndPoint(), false), false),
- stream_(1, &session_, BoundNetLog()) {
+ stream_(kStreamId, &session_, BoundNetLog()) {
stream_.SetDelegate(&delegate_);
}
@@ -82,17 +84,17 @@ class QuicReliableClientStreamTest : public ::testing::Test {
TEST_F(QuicReliableClientStreamTest, OnFinRead) {
InitializeHeaders();
- const QuicGuid kStreamId = 1;
+ QuicSpdyCompressor compressor;
+ string compressed_headers = compressor.CompressHeaders(headers_);
+ QuicStreamFrame frame1(kStreamId, false, 0, MakeIOVector(compressed_headers));
string uncompressed_headers =
SpdyUtils::SerializeUncompressedHeaders(headers_);
- QuicStreamFrame frame1(kStreamId, false, 0,
- MakeIOVector(uncompressed_headers));
EXPECT_CALL(delegate_, OnDataReceived(StrEq(uncompressed_headers.data()),
uncompressed_headers.size()));
stream_.OnStreamFrame(frame1);
IOVector iov;
- QuicStreamFrame frame2(kStreamId, true, uncompressed_headers.length(), iov);
+ QuicStreamFrame frame2(kStreamId, true, compressed_headers.length(), iov);
EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
stream_.OnStreamFrame(frame2);
}
« no previous file with comments | « net/quic/quic_reliable_client_stream.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698