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

Side by Side Diff: net/quic/quic_data_stream_test.cc

Issue 137893008: WriteBlockedList for QUIC that prioritizes Crypto and Headers streams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_data_stream.cc ('k') | net/quic/quic_http_stream_test.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/quic_data_stream.h" 5 #include "net/quic/quic_data_stream.h"
6 6
7 #include "net/quic/quic_ack_notifier.h" 7 #include "net/quic/quic_ack_notifier.h"
8 #include "net/quic/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 #include "net/quic/quic_spdy_compressor.h" 9 #include "net/quic/quic_spdy_compressor.h"
10 #include "net/quic/quic_spdy_decompressor.h" 10 #include "net/quic/quic_spdy_decompressor.h"
11 #include "net/quic/quic_utils.h" 11 #include "net/quic/quic_utils.h"
12 #include "net/quic/quic_write_blocked_list.h"
12 #include "net/quic/spdy_utils.h" 13 #include "net/quic/spdy_utils.h"
13 #include "net/quic/test_tools/quic_session_peer.h" 14 #include "net/quic/test_tools/quic_session_peer.h"
14 #include "net/quic/test_tools/quic_test_utils.h" 15 #include "net/quic/test_tools/quic_test_utils.h"
15 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
16 17
17 using base::StringPiece; 18 using base::StringPiece;
18 using std::min; 19 using std::min;
19 using testing::_; 20 using testing::_;
20 using testing::InSequence; 21 using testing::InSequence;
21 using testing::Return; 22 using testing::Return;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 113 }
113 114
114 protected: 115 protected:
115 MockConnection* connection_; 116 MockConnection* connection_;
116 scoped_ptr<MockSession> session_; 117 scoped_ptr<MockSession> session_;
117 scoped_ptr<TestStream> stream_; 118 scoped_ptr<TestStream> stream_;
118 scoped_ptr<TestStream> stream2_; 119 scoped_ptr<TestStream> stream2_;
119 scoped_ptr<QuicSpdyCompressor> compressor_; 120 scoped_ptr<QuicSpdyCompressor> compressor_;
120 scoped_ptr<QuicSpdyDecompressor> decompressor_; 121 scoped_ptr<QuicSpdyDecompressor> decompressor_;
121 SpdyHeaderBlock headers_; 122 SpdyHeaderBlock headers_;
122 WriteBlockedList<QuicStreamId>* write_blocked_list_; 123 QuicWriteBlockedList* write_blocked_list_;
123 }; 124 };
124 125
125 INSTANTIATE_TEST_CASE_P(Tests, QuicDataStreamTest, 126 INSTANTIATE_TEST_CASE_P(Tests, QuicDataStreamTest,
126 ::testing::ValuesIn(QuicSupportedVersions())); 127 ::testing::ValuesIn(QuicSupportedVersions()));
127 128
128 TEST_P(QuicDataStreamTest, ProcessHeaders) { 129 TEST_P(QuicDataStreamTest, ProcessHeaders) {
129 Initialize(kShouldProcessData); 130 Initialize(kShouldProcessData);
130 131
131 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); 132 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
132 if (GetParam() > QUIC_VERSION_12) { 133 if (GetParam() > QUIC_VERSION_12) {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_HEADER_ID)) 557 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_HEADER_ID))
557 .Times(0); 558 .Times(0);
558 QuicStreamFrame frame2(stream_->id(), false, compressed_headers.length(), 559 QuicStreamFrame frame2(stream_->id(), false, compressed_headers.length(),
559 MakeIOVector("body data")); 560 MakeIOVector("body data"));
560 stream_->OnStreamFrame(frame2); 561 stream_->OnStreamFrame(frame2);
561 } 562 }
562 563
563 } // namespace 564 } // namespace
564 } // namespace test 565 } // namespace test
565 } // namespace net 566 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_data_stream.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698