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

Unified Diff: net/quic/quic_headers_stream_test.cc

Issue 2018513002: Plumb unmodified HTTP/2 stream weight value through SPDY framing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/quic_headers_stream.cc ('k') | net/quic/test_tools/quic_test_packet_maker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_headers_stream_test.cc
diff --git a/net/quic/quic_headers_stream_test.cc b/net/quic/quic_headers_stream_test.cc
index 4bb65969957fd71acd2bc740352d43c9b54e7506..f89713a110442eb93930049cdaf4dd5dabc91fea 100644
--- a/net/quic/quic_headers_stream_test.cc
+++ b/net/quic/quic_headers_stream_test.cc
@@ -83,7 +83,7 @@ class MockVisitor : public SpdyFramerVisitorInterface {
MOCK_METHOD7(OnHeaders,
void(SpdyStreamId stream_id,
bool has_priority,
- SpdyPriority priority,
+ int weight,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
@@ -222,7 +222,8 @@ class QuicHeadersStreamTest : public ::testing::TestWithParam<TestParams> {
// Parse the outgoing data and check that it matches was was written.
if (type == SYN_STREAM) {
EXPECT_CALL(visitor_,
- OnHeaders(stream_id, kHasPriority, priority,
+ OnHeaders(stream_id, kHasPriority,
+ Spdy3PriorityToHttp2Weight(priority),
/*parent_stream_id=*/0,
/*exclusive=*/false, fin, kFrameComplete));
} else {
@@ -357,6 +358,7 @@ TEST_P(QuicHeadersStreamTest, ProcessRawData) {
headers_frame.set_header_block(headers_);
headers_frame.set_fin(fin);
headers_frame.set_has_priority(true);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(0));
frame = framer_->SerializeFrame(headers_frame);
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
} else {
@@ -425,6 +427,7 @@ TEST_P(QuicHeadersStreamTest, EmptyHeaderHOLBlockedTime) {
headers_frame.set_header_block(headers_);
headers_frame.set_fin(fin);
headers_frame.set_has_priority(true);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(0));
frame = framer_->SerializeFrame(headers_frame);
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
} else {
@@ -461,6 +464,7 @@ TEST_P(QuicHeadersStreamTest, NonEmptyHeaderHOLBlockedTime) {
headers_frame.set_header_block(headers_);
headers_frame.set_fin(fin);
headers_frame.set_has_priority(true);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(0));
frames[stream_num] = framer_->SerializeFrame(headers_frame);
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0)).Times(1);
} else {
@@ -509,6 +513,7 @@ TEST_P(QuicHeadersStreamTest, ProcessLargeRawData) {
headers_frame.set_header_block(headers_);
headers_frame.set_fin(fin);
headers_frame.set_has_priority(true);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(0));
frame = framer_->SerializeFrame(headers_frame);
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
} else {
@@ -651,6 +656,7 @@ TEST_P(QuicHeadersStreamTest, HpackDecoderDebugVisitor) {
headers_frame.set_header_block(headers_);
headers_frame.set_fin(fin);
headers_frame.set_has_priority(true);
+ headers_frame.set_weight(Spdy3PriorityToHttp2Weight(0));
frame = framer_->SerializeFrame(headers_frame);
EXPECT_CALL(session_, OnStreamHeadersPriority(stream_id, 0));
} else {
« no previous file with comments | « net/quic/quic_headers_stream.cc ('k') | net/quic/test_tools/quic_test_packet_maker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698