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

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

Issue 1471573002: Replacing EffectivePriority with Priority for QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107595145
Patch Set: Created 5 years, 1 month 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/quic_spdy_stream.cc ('k') | net/quic/quic_stream_sequencer_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_spdy_stream.h" 5 #include "net/quic/quic_spdy_stream.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
9 #include "net/quic/quic_write_blocked_list.h" 9 #include "net/quic/quic_write_blocked_list.h"
10 #include "net/quic/spdy_utils.h" 10 #include "net/quic/spdy_utils.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 TEST_P(QuicSpdyStreamTest, ProcessHeaders) { 119 TEST_P(QuicSpdyStreamTest, ProcessHeaders) {
120 Initialize(kShouldProcessData); 120 Initialize(kShouldProcessData);
121 121
122 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); 122 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
123 stream_->OnStreamHeadersPriority(QuicUtils::HighestPriority()); 123 stream_->OnStreamHeadersPriority(QuicUtils::HighestPriority());
124 stream_->OnStreamHeaders(headers); 124 stream_->OnStreamHeaders(headers);
125 EXPECT_EQ("", stream_->data()); 125 EXPECT_EQ("", stream_->data());
126 EXPECT_EQ(headers, stream_->decompressed_headers()); 126 EXPECT_EQ(headers, stream_->decompressed_headers());
127 stream_->OnStreamHeadersComplete(false, headers.size()); 127 stream_->OnStreamHeadersComplete(false, headers.size());
128 EXPECT_EQ(QuicUtils::HighestPriority(), stream_->EffectivePriority()); 128 EXPECT_EQ(QuicUtils::HighestPriority(), stream_->Priority());
129 EXPECT_EQ("", stream_->data()); 129 EXPECT_EQ("", stream_->data());
130 EXPECT_EQ(headers, stream_->decompressed_headers()); 130 EXPECT_EQ(headers, stream_->decompressed_headers());
131 EXPECT_FALSE(stream_->IsDoneReading()); 131 EXPECT_FALSE(stream_->IsDoneReading());
132 } 132 }
133 133
134 TEST_P(QuicSpdyStreamTest, ProcessHeadersWithFin) { 134 TEST_P(QuicSpdyStreamTest, ProcessHeadersWithFin) {
135 Initialize(kShouldProcessData); 135 Initialize(kShouldProcessData);
136 136
137 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); 137 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
138 stream_->OnStreamHeadersPriority(QuicUtils::HighestPriority()); 138 stream_->OnStreamHeadersPriority(QuicUtils::HighestPriority());
139 stream_->OnStreamHeaders(headers); 139 stream_->OnStreamHeaders(headers);
140 EXPECT_EQ("", stream_->data()); 140 EXPECT_EQ("", stream_->data());
141 EXPECT_EQ(headers, stream_->decompressed_headers()); 141 EXPECT_EQ(headers, stream_->decompressed_headers());
142 stream_->OnStreamHeadersComplete(true, headers.size()); 142 stream_->OnStreamHeadersComplete(true, headers.size());
143 EXPECT_EQ(QuicUtils::HighestPriority(), stream_->EffectivePriority()); 143 EXPECT_EQ(QuicUtils::HighestPriority(), stream_->Priority());
144 EXPECT_EQ("", stream_->data()); 144 EXPECT_EQ("", stream_->data());
145 EXPECT_EQ(headers, stream_->decompressed_headers()); 145 EXPECT_EQ(headers, stream_->decompressed_headers());
146 EXPECT_FALSE(stream_->IsDoneReading()); 146 EXPECT_FALSE(stream_->IsDoneReading());
147 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); 147 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
148 } 148 }
149 149
150 TEST_P(QuicSpdyStreamTest, MarkHeadersConsumed) { 150 TEST_P(QuicSpdyStreamTest, MarkHeadersConsumed) {
151 Initialize(kShouldProcessData); 151 Initialize(kShouldProcessData);
152 152
153 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_); 153 string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 EXPECT_CALL(*connection_, SendBlocked(kClientDataStreamId1)).Times(0); 600 EXPECT_CALL(*connection_, SendBlocked(kClientDataStreamId1)).Times(0);
601 EXPECT_CALL(*session_, WritevData(kClientDataStreamId1, _, _, _, _, _)) 601 EXPECT_CALL(*session_, WritevData(kClientDataStreamId1, _, _, _, _, _))
602 .WillOnce(Return(QuicConsumedData(0, fin))); 602 .WillOnce(Return(QuicConsumedData(0, fin)));
603 603
604 stream_->WriteOrBufferData(body, fin, nullptr); 604 stream_->WriteOrBufferData(body, fin, nullptr);
605 } 605 }
606 606
607 } // namespace 607 } // namespace
608 } // namespace test 608 } // namespace test
609 } // namespace net 609 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_stream.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698