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

Side by Side Diff: net/quic/core/quic_headers_stream_test.cc

Issue 2566513004: This change removes SpdyFramer::set_enable_compression() in favor of a constructor parameter. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_headers_stream.cc ('k') | net/quic/core/spdy_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_headers_stream.h" 5 #include "net/quic/core/quic_headers_stream.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 #include <string> 8 #include <string>
9 #include <tuple> 9 #include <tuple>
10 #include <utility> 10 #include <utility>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 session_(connection_), 229 session_(connection_),
230 headers_stream_(QuicSpdySessionPeer::GetHeadersStream(&session_)), 230 headers_stream_(QuicSpdySessionPeer::GetHeadersStream(&session_)),
231 body_("hello world"), 231 body_("hello world"),
232 hpack_encoder_visitor_(new StrictMock<MockHpackDebugVisitor>), 232 hpack_encoder_visitor_(new StrictMock<MockHpackDebugVisitor>),
233 hpack_decoder_visitor_(new StrictMock<MockHpackDebugVisitor>), 233 hpack_decoder_visitor_(new StrictMock<MockHpackDebugVisitor>),
234 stream_frame_(kHeadersStreamId, /*fin=*/false, /*offset=*/0, ""), 234 stream_frame_(kHeadersStreamId, /*fin=*/false, /*offset=*/0, ""),
235 next_promised_stream_id_(2) { 235 next_promised_stream_id_(2) {
236 headers_[":version"] = "HTTP/1.1"; 236 headers_[":version"] = "HTTP/1.1";
237 headers_[":status"] = "200 Ok"; 237 headers_[":status"] = "200 Ok";
238 headers_["content-length"] = "11"; 238 headers_["content-length"] = "11";
239 framer_ = std::unique_ptr<SpdyFramer>(new SpdyFramer); 239 framer_ = std::unique_ptr<SpdyFramer>(
240 new SpdyFramer(SpdyFramer::ENABLE_COMPRESSION));
240 framer_->set_visitor(&visitor_); 241 framer_->set_visitor(&visitor_);
241 EXPECT_EQ(version(), session_.connection()->version()); 242 EXPECT_EQ(version(), session_.connection()->version());
242 EXPECT_TRUE(headers_stream_ != nullptr); 243 EXPECT_TRUE(headers_stream_ != nullptr);
243 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); 244 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1));
244 } 245 }
245 246
246 QuicConsumedData SaveIov(const QuicIOVector& data) { 247 QuicConsumedData SaveIov(const QuicIOVector& data) {
247 const iovec* iov = data.iov; 248 const iovec* iov = data.iov;
248 int count = data.iov_count; 249 int count = data.iov_count;
249 int consumed = 0; 250 int consumed = 0;
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 consumed_data = headers_stream_->WritevStreamData( 1045 consumed_data = headers_stream_->WritevStreamData(
1045 id, MakeIOVector(data, &iov), offset, fin, nullptr); 1046 id, MakeIOVector(data, &iov), offset, fin, nullptr);
1046 1047
1047 EXPECT_EQ(consumed_data.bytes_consumed, 0u); 1048 EXPECT_EQ(consumed_data.bytes_consumed, 0u);
1048 EXPECT_EQ(consumed_data.fin_consumed, false); 1049 EXPECT_EQ(consumed_data.fin_consumed, false);
1049 } 1050 }
1050 1051
1051 } // namespace 1052 } // namespace
1052 } // namespace test 1053 } // namespace test
1053 } // namespace net 1054 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_headers_stream.cc ('k') | net/quic/core/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698