summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnc <bnc@chromium.org>2015-06-23 14:38:26 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-23 21:39:01 +0000
commitd8ad9a7c88b978ebcb655c5e0a389fde9b169dbc (patch)
tree7db516568cdbe9a7ed5955c4830a34f1b0cd567f
parentc5d9a0ea754aba8264a36e59d2a60a6722fd56b3 (diff)
downloadchromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.zip
chromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.tar.gz
chromium_src-d8ad9a7c88b978ebcb655c5e0a389fde9b169dbc.tar.bz2
Parse stream dependency values carried in HTTP/2 headers frame.
Modify SpdyFramer to parse stream dependency values present in HTTP/2 headers frames, and pass them to SpdyFramerVisitorInterface::OnHeaders() via two newly added parameters, |parent_stream_id| and |exclusive|. Modify existing implementations of SpdyFramerVisitorInterface::OnHeaders() to accept and ignore the new arguments. This CL lands server change 95217891 by mpw. BUG=500673 Review URL: https://codereview.chromium.org/1196473003 Cr-Commit-Position: refs/heads/master@{#335754}
-rw-r--r--net/quic/quic_headers_stream.cc2
-rw-r--r--net/quic/quic_headers_stream_test.cc24
-rw-r--r--net/spdy/buffered_spdy_framer.cc9
-rw-r--r--net/spdy/buffered_spdy_framer.h6
-rw-r--r--net/spdy/buffered_spdy_framer_unittest.cc2
-rw-r--r--net/spdy/mock_spdy_framer_visitor.h10
-rw-r--r--net/spdy/spdy_framer.cc34
-rw-r--r--net/spdy/spdy_framer.h15
-rw-r--r--net/spdy/spdy_framer_test.cc90
-rw-r--r--net/spdy/spdy_session.cc2
-rw-r--r--net/spdy/spdy_session.h2
-rw-r--r--net/spdy/spdy_test_util_common.cc2
-rw-r--r--net/tools/flip_server/spdy_interface.cc2
-rw-r--r--net/tools/flip_server/spdy_interface.h2
-rw-r--r--net/tools/flip_server/spdy_interface_test.cc29
15 files changed, 182 insertions, 49 deletions
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 35d81d04..d077e44 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -109,6 +109,8 @@ class QuicHeadersStream::SpdyFramerVisitor
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
bool end) override {
if (!stream_->IsConnected()) {
diff --git a/net/quic/quic_headers_stream_test.cc b/net/quic/quic_headers_stream_test.cc
index b2cd256..cd12b3d 100644
--- a/net/quic/quic_headers_stream_test.cc
+++ b/net/quic/quic_headers_stream_test.cc
@@ -55,8 +55,14 @@ class MockVisitor : public SpdyFramerVisitorInterface {
MOCK_METHOD2(OnPing, void(SpdyPingId unique_id, bool is_ack));
MOCK_METHOD2(OnGoAway, void(SpdyStreamId last_accepted_stream_id,
SpdyGoAwayStatus status));
- MOCK_METHOD5(OnHeaders, void(SpdyStreamId stream_id, bool has_priority,
- SpdyPriority priority, bool fin, bool end));
+ MOCK_METHOD7(OnHeaders,
+ void(SpdyStreamId stream_id,
+ bool has_priority,
+ SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
+ bool fin,
+ bool end));
MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id,
uint32 delta_window_size));
MOCK_METHOD2(OnCredentialFrameData, bool(const char* credential_data,
@@ -158,11 +164,17 @@ 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, fin,
- kFrameComplete));
+ EXPECT_CALL(visitor_, OnHeaders(stream_id, kHasPriority, priority,
+ /*parent_stream_id=*/0,
+ /*exclusive=*/false,
+
+ fin, kFrameComplete));
} else {
- EXPECT_CALL(visitor_, OnHeaders(stream_id, !kHasPriority,
- /*priority=*/0, fin, kFrameComplete));
+ EXPECT_CALL(visitor_,
+ OnHeaders(stream_id, !kHasPriority,
+ /*priority=*/0,
+ /*parent_stream_id=*/0,
+ /*exclusive=*/false, fin, kFrameComplete));
}
EXPECT_CALL(visitor_, OnControlFrameHeaderData(stream_id, _, _))
.WillRepeatedly(WithArgs<1, 2>(
diff --git a/net/spdy/buffered_spdy_framer.cc b/net/spdy/buffered_spdy_framer.cc
index 40882af..d61291c 100644
--- a/net/spdy/buffered_spdy_framer.cc
+++ b/net/spdy/buffered_spdy_framer.cc
@@ -79,6 +79,8 @@ void BufferedSpdyFramer::OnSynStream(SpdyStreamId stream_id,
void BufferedSpdyFramer::OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
bool end) {
frames_received_++;
@@ -89,6 +91,8 @@ void BufferedSpdyFramer::OnHeaders(SpdyStreamId stream_id,
control_frame_fields_->has_priority = has_priority;
if (control_frame_fields_->has_priority) {
control_frame_fields_->priority = priority;
+ control_frame_fields_->parent_stream_id = parent_stream_id;
+ control_frame_fields_->exclusive = exclusive;
}
control_frame_fields_->fin = fin;
@@ -145,8 +149,9 @@ bool BufferedSpdyFramer::OnControlFrameHeaderData(SpdyStreamId stream_id,
visitor_->OnHeaders(control_frame_fields_->stream_id,
control_frame_fields_->has_priority,
control_frame_fields_->priority,
- control_frame_fields_->fin,
- headers);
+ control_frame_fields_->parent_stream_id,
+ control_frame_fields_->exclusive,
+ control_frame_fields_->fin, headers);
break;
case PUSH_PROMISE:
DCHECK_LT(SPDY3, protocol_version());
diff --git a/net/spdy/buffered_spdy_framer.h b/net/spdy/buffered_spdy_framer.h
index 7025aad..9e4020a 100644
--- a/net/spdy/buffered_spdy_framer.h
+++ b/net/spdy/buffered_spdy_framer.h
@@ -51,6 +51,8 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramerVisitorInterface {
virtual void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) = 0;
@@ -152,6 +154,8 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramer
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
bool end) override;
bool OnControlFrameHeaderData(SpdyStreamId stream_id,
@@ -277,6 +281,8 @@ class NET_EXPORT_PRIVATE BufferedSpdyFramer
SpdyStreamId promised_stream_id;
bool has_priority;
SpdyPriority priority;
+ SpdyStreamId parent_stream_id;
+ bool exclusive;
uint8 credential_slot;
bool fin;
bool unidirectional;
diff --git a/net/spdy/buffered_spdy_framer_unittest.cc b/net/spdy/buffered_spdy_framer_unittest.cc
index c5dc50c..2f2a683 100644
--- a/net/spdy/buffered_spdy_framer_unittest.cc
+++ b/net/spdy/buffered_spdy_framer_unittest.cc
@@ -61,6 +61,8 @@ class TestBufferedSpdyVisitor : public BufferedSpdyFramerVisitorInterface {
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) override {
header_stream_id_ = stream_id;
diff --git a/net/spdy/mock_spdy_framer_visitor.h b/net/spdy/mock_spdy_framer_visitor.h
index 9a846f4..d6083c7 100644
--- a/net/spdy/mock_spdy_framer_visitor.h
+++ b/net/spdy/mock_spdy_framer_visitor.h
@@ -43,8 +43,14 @@ class MockSpdyFramerVisitor : public SpdyFramerVisitorInterface {
MOCK_METHOD0(OnSettingsEnd, void());
MOCK_METHOD2(OnGoAway, void(SpdyStreamId last_accepted_stream_id,
SpdyGoAwayStatus status));
- MOCK_METHOD5(OnHeaders, void(SpdyStreamId stream_id, bool has_priority,
- SpdyPriority priority, bool fin, bool end));
+ MOCK_METHOD7(OnHeaders,
+ void(SpdyStreamId stream_id,
+ bool has_priority,
+ SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
+ bool fin,
+ bool end));
MOCK_METHOD2(OnWindowUpdate, void(SpdyStreamId stream_id,
uint32 delta_window_size));
MOCK_METHOD1(OnBlocked, void(SpdyStreamId stream_id));
diff --git a/net/spdy/spdy_framer.cc b/net/spdy/spdy_framer.cc
index 7aee1ec..91afcd2 100644
--- a/net/spdy/spdy_framer.cc
+++ b/net/spdy/spdy_framer.cc
@@ -64,6 +64,16 @@ uint32 PackStreamDependencyValues(bool exclusive,
return parent | e_bit;
}
+// Unpack parent stream ID and exclusive flag from the format used by HTTP/2
+// headers and priority frames.
+void UnpackStreamDependencyValues(uint32 packed,
+ bool* exclusive,
+ SpdyStreamId* parent_stream_id) {
+ *exclusive = (packed >> 31) != 0;
+ // Zero out the highest-order bit to get the parent stream id.
+ *parent_stream_id = packed & 0x7fffffff;
+}
+
struct DictionaryIds {
DictionaryIds()
: v2_dictionary_id(CalculateDictionaryId(kV2Dictionary, kV2DictionarySize)),
@@ -1504,9 +1514,15 @@ size_t SpdyFramer::ProcessControlFrameBeforeHeaderBlock(const char* data,
const bool has_priority =
(current_frame_flags_ & HEADERS_FLAG_PRIORITY) != 0;
SpdyPriority priority = 0;
+ uint32 parent_stream_id = 0;
+ bool exclusive = false;
if (protocol_version() > SPDY3 && has_priority) {
- // TODO(jgraettinger): Process dependency rather than ignoring it.
- reader.Seek(kPriorityDependencyPayloadSize);
+ uint32 stream_dependency;
+ successful_read = reader.ReadUInt32(&stream_dependency);
+ DCHECK(successful_read);
+ UnpackStreamDependencyValues(stream_dependency, &exclusive,
+ &parent_stream_id);
+
uint8 weight = 0;
successful_read = reader.ReadUInt8(&weight);
if (successful_read) {
@@ -1528,6 +1544,7 @@ size_t SpdyFramer::ProcessControlFrameBeforeHeaderBlock(const char* data,
visitor_->OnHeaders(
current_frame_stream_id_,
(current_frame_flags_ & HEADERS_FLAG_PRIORITY) != 0, priority,
+ parent_stream_id, exclusive,
(current_frame_flags_ & CONTROL_FLAG_FIN) != 0,
expect_continuation_ == 0);
}
@@ -1876,16 +1893,15 @@ size_t SpdyFramer::ProcessControlFramePayload(const char* data, size_t len) {
break;
case PRIORITY: {
DCHECK_LT(SPDY3, protocol_version());
+ uint32 stream_dependency;
uint32 parent_stream_id;
- uint8 weight;
bool exclusive;
- bool successful_read = true;
- successful_read = reader.ReadUInt32(&parent_stream_id);
+ uint8 weight;
+ bool successful_read = reader.ReadUInt32(&stream_dependency);
DCHECK(successful_read);
- // Exclusivity is indicated by a single bit flag.
- exclusive = (parent_stream_id >> 31) != 0;
- // Zero out the highest-order bit to get the parent stream id.
- parent_stream_id &= 0x7fffffff;
+ UnpackStreamDependencyValues(stream_dependency, &exclusive,
+ &parent_stream_id);
+
successful_read = reader.ReadUInt8(&weight);
DCHECK(successful_read);
DCHECK(reader.IsDoneReading());
diff --git a/net/spdy/spdy_framer.h b/net/spdy/spdy_framer.h
index 86d956c..ffb8984f 100644
--- a/net/spdy/spdy_framer.h
+++ b/net/spdy/spdy_framer.h
@@ -223,9 +223,24 @@ class NET_EXPORT_PRIVATE SpdyFramerVisitorInterface {
// Called when a HEADERS frame is received.
// Note that header block data is not included. See
// OnControlFrameHeaderData().
+ // |stream_id| The stream receiving the header.
+ // |has_priority| Whether or not the headers frame included a priority value,
+ // and, if protocol version >= HTTP2, stream dependency info.
+ // |priority| If |has_priority| is true and protocol version > SPDY3,
+ // priority value for the receiving stream, else 0.
+ // |parent_stream_id| If |has_priority| is true and protocol
+ // version >= HTTP2, the parent stream of the receiving stream, else 0.
+ // |exclusive| If |has_priority| is true and protocol
+ // version >= HTTP2, the exclusivity of dependence on the parent stream,
+ // else false.
+ // |fin| Whether FIN flag is set in frame headers.
+ // |end| False if HEADERs frame is to be followed by a CONTINUATION frame,
+ // or true if not.
virtual void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
bool end) = 0;
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index b6e4d99..0d8a74a 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -152,15 +152,20 @@ class SpdyFramerTestUtil {
LOG(FATAL);
}
- void OnHeaders(SpdyStreamId stream_id, bool has_priority,
- SpdyPriority priority, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id,
+ bool has_priority,
+ SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
+ bool fin,
+ bool end) override {
SpdyFramer framer(version_);
framer.set_enable_compression(false);
SpdyHeadersIR headers(stream_id);
headers.set_has_priority(has_priority);
- if (headers.has_priority()) {
- headers.set_priority(priority);
- }
+ headers.set_priority(priority);
+ headers.set_parent_stream_id(parent_stream_id);
+ headers.set_exclusive(exclusive);
headers.set_fin(fin);
scoped_ptr<SpdyFrame> frame(framer.SerializeHeaders(headers));
ResetBuffer();
@@ -399,13 +404,21 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
++goaway_count_;
}
- void OnHeaders(SpdyStreamId stream_id, bool has_priority,
- SpdyPriority priority, bool fin, bool end) override {
+ void OnHeaders(SpdyStreamId stream_id,
+ bool has_priority,
+ SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
+ bool fin,
+ bool end) override {
++headers_frame_count_;
InitHeaderStreaming(HEADERS, stream_id);
if (fin) {
++fin_flag_count_;
}
+ header_has_priority_ = has_priority;
+ header_parent_stream_id_ = parent_stream_id;
+ header_exclusive_ = exclusive;
}
void OnWindowUpdate(SpdyStreamId stream_id,
@@ -563,6 +576,9 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface,
SpdyFrameType header_control_type_;
bool header_buffer_valid_;
SpdyHeaderBlock headers_;
+ bool header_has_priority_;
+ SpdyStreamId header_parent_stream_id_;
+ bool header_exclusive_;
};
class SpdyFramerPeer {
@@ -762,6 +778,38 @@ TEST_P(SpdyFramerTest, UndersizedHeaderBlockInBuffer) {
EXPECT_EQ(0u, visitor.headers_.size());
}
+// Test that we can encode and decode stream dependency values in a header
+// frame.
+TEST_P(SpdyFramerTest, HeaderStreamDependencyValues) {
+ if (spdy_version_ <= SPDY3) {
+ return;
+ }
+ SpdyFramer framer(spdy_version_);
+ framer.set_enable_compression(false);
+
+ const SpdyStreamId parent_stream_id_test_array[] = {0, 3};
+ for (SpdyStreamId parent_stream_id : parent_stream_id_test_array) {
+ const bool exclusive_test_array[] = {true, false};
+ for (bool exclusive : exclusive_test_array) {
+ SpdyHeadersIR headers(1);
+ headers.set_has_priority(true);
+ headers.set_parent_stream_id(parent_stream_id);
+ headers.set_exclusive(exclusive);
+ scoped_ptr<SpdyFrame> frame(framer.SerializeHeaders(headers));
+ EXPECT_TRUE(frame.get() != NULL);
+
+ TestSpdyVisitor visitor(spdy_version_);
+ visitor.use_compression_ = false;
+ visitor.SimulateInFramer(reinterpret_cast<unsigned char*>(frame->data()),
+ frame->size());
+
+ EXPECT_TRUE(visitor.header_has_priority_);
+ EXPECT_EQ(parent_stream_id, visitor.header_parent_stream_id_);
+ EXPECT_EQ(exclusive, visitor.header_exclusive_);
+ }
+ }
+}
+
// Test that if we receive a SYN_REPLY with stream ID zero, we signal an error
// (but don't crash).
TEST_P(SpdyFramerTest, SynReplyWithStreamIdZero) {
@@ -5279,6 +5327,8 @@ TEST_P(SpdyFramerTest, HeadersFrameFlags) {
if (IsHttp2() && (flags & HEADERS_FLAG_PRIORITY)) {
headers_ir.set_priority(3);
headers_ir.set_has_priority(true);
+ headers_ir.set_parent_stream_id(5);
+ headers_ir.set_exclusive(true);
}
headers_ir.SetHeader("foo", "bar");
scoped_ptr<SpdyFrame> frame(framer.SerializeHeaders(headers_ir));
@@ -5299,18 +5349,22 @@ TEST_P(SpdyFramerTest, HeadersFrameFlags) {
HEADERS_FLAG_PRIORITY)) {
EXPECT_CALL(visitor, OnError(_));
} else {
+ // Expected callback values
+ SpdyStreamId stream_id = 57;
+ bool has_priority = false;
+ SpdyPriority priority = 0;
+ SpdyStreamId parent_stream_id = 0;
+ bool exclusive = false;
+ bool fin = flags & CONTROL_FLAG_FIN;
+ bool end = !IsHttp2() || (flags & HEADERS_FLAG_END_HEADERS);
if (spdy_version_ > SPDY3 && flags & HEADERS_FLAG_PRIORITY) {
- EXPECT_CALL(visitor, OnHeaders(57, // stream id
- true, // has priority?
- 3, // priority
- flags & CONTROL_FLAG_FIN, // fin?
- (flags & HEADERS_FLAG_END_HEADERS) ||
- !IsHttp2())); // end headers?
- } else {
- EXPECT_CALL(visitor, OnHeaders(57, false, 0, flags & CONTROL_FLAG_FIN,
- (flags & HEADERS_FLAG_END_HEADERS) ||
- !IsHttp2()));
+ has_priority = true;
+ priority = 3;
+ parent_stream_id = 5;
+ exclusive = true;
}
+ EXPECT_CALL(visitor, OnHeaders(stream_id, has_priority, priority,
+ parent_stream_id, exclusive, fin, end));
EXPECT_CALL(visitor, OnControlFrameHeaderData(57, _, _))
.WillRepeatedly(testing::Return(true));
if (flags & DATA_FLAG_FIN &&
@@ -5484,7 +5538,7 @@ TEST_P(SpdyFramerTest, ContinuationFrameFlags) {
EXPECT_CALL(debug_visitor, OnSendCompressedFrame(42, HEADERS, _, _));
EXPECT_CALL(debug_visitor, OnReceiveCompressedFrame(42, HEADERS, _));
- EXPECT_CALL(visitor, OnHeaders(42, false, 0, 0, false));
+ EXPECT_CALL(visitor, OnHeaders(42, false, 0, 0, false, false, false));
EXPECT_CALL(visitor, OnControlFrameHeaderData(42, _, _))
.WillRepeatedly(testing::Return(true));
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a648ae9..d6daf6b 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -2333,6 +2333,8 @@ void SpdySession::OnSynReply(SpdyStreamId stream_id,
void SpdySession::OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) {
CHECK(in_io_loop_);
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 8c25ec9..bb86664 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -848,6 +848,8 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) override;
bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override;
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 555c202..7451a37 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -230,6 +230,8 @@ class PriorityGetter : public BufferedSpdyFramerVisitorInterface {
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) override {
if (has_priority) {
diff --git a/net/tools/flip_server/spdy_interface.cc b/net/tools/flip_server/spdy_interface.cc
index facbe5b..6217afb 100644
--- a/net/tools/flip_server/spdy_interface.cc
+++ b/net/tools/flip_server/spdy_interface.cc
@@ -292,6 +292,8 @@ void SpdySM::OnSynReply(SpdyStreamId stream_id,
void SpdySM::OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) {
VLOG(2) << ACCEPTOR_CLIENT_IDENT << "SpdySM: OnHeaders(" << stream_id << ")";
diff --git a/net/tools/flip_server/spdy_interface.h b/net/tools/flip_server/spdy_interface.h
index 20bc0c9..8055635 100644
--- a/net/tools/flip_server/spdy_interface.h
+++ b/net/tools/flip_server/spdy_interface.h
@@ -83,6 +83,8 @@ class SpdySM : public BufferedSpdyFramerVisitorInterface, public SMInterface {
void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
bool fin,
const SpdyHeaderBlock& headers) override;
diff --git a/net/tools/flip_server/spdy_interface_test.cc b/net/tools/flip_server/spdy_interface_test.cc
index 5f89a2b..412401c 100644
--- a/net/tools/flip_server/spdy_interface_test.cc
+++ b/net/tools/flip_server/spdy_interface_test.cc
@@ -52,12 +52,14 @@ class SpdyFramerVisitor : public BufferedSpdyFramerVisitorInterface {
bool,
const SpdyHeaderBlock&));
MOCK_METHOD3(OnSynReply, void(SpdyStreamId, bool, const SpdyHeaderBlock&));
- MOCK_METHOD5(OnHeaders,
- void(SpdyStreamId,
- bool,
- SpdyPriority,
- bool,
- const SpdyHeaderBlock&));
+ MOCK_METHOD7(OnHeaders,
+ void(SpdyStreamId stream_id,
+ bool has_priority,
+ SpdyPriority priority,
+ SpdyStreamId parent_stream_id,
+ bool exclusive,
+ bool fin,
+ const SpdyHeaderBlock& headers));
MOCK_METHOD3(OnDataFrameHeader, void(SpdyStreamId, size_t, bool));
MOCK_METHOD4(OnStreamFrameData, void(SpdyStreamId,
const char*,
@@ -367,8 +369,9 @@ TEST_P(SpdySMProxyTest, SendErrorNotFound) {
.WillOnce(SaveArg<2>(&actual_header_block));
} else {
EXPECT_CALL(*spdy_framer_visitor_,
- OnHeaders(stream_id, false, 0, false, _))
- .WillOnce(SaveArg<4>(&actual_header_block));
+ OnHeaders(stream_id, /*has_priority=*/false, _, _, _,
+ /*fin=*/false, _))
+ .WillOnce(SaveArg<6>(&actual_header_block));
}
EXPECT_CALL(checkpoint, Call(0));
EXPECT_CALL(*spdy_framer_visitor_,
@@ -446,8 +449,9 @@ TEST_P(SpdySMProxyTest, SendSynReply) {
.WillOnce(SaveArg<2>(&actual_header_block));
} else {
EXPECT_CALL(*spdy_framer_visitor_,
- OnHeaders(stream_id, false, 0, false, _))
- .WillOnce(SaveArg<4>(&actual_header_block));
+ OnHeaders(stream_id, /*has_priority=*/false, _, _, _,
+ /*fin=*/false, _))
+ .WillOnce(SaveArg<6>(&actual_header_block));
}
}
@@ -572,8 +576,9 @@ TEST_P(SpdySMServerTest, NewStreamError) {
.WillOnce(SaveArg<2>(&actual_header_block));
} else {
EXPECT_CALL(*spdy_framer_visitor_,
- OnHeaders(stream_id, false, 0, false, _))
- .WillOnce(SaveArg<4>(&actual_header_block));
+ OnHeaders(stream_id, /*has_priority=*/false, _, _, _,
+ /*fin=*/false, _))
+ .WillOnce(SaveArg<6>(&actual_header_block));
}
EXPECT_CALL(checkpoint, Call(0));
EXPECT_CALL(*spdy_framer_visitor_,