Index: net/spdy/spdy_framer_test.cc |
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc |
index 980a74157f5296e61b235b24b434731703742322..390bc6e1379d03d2774670d9b89aa01508e95dad 100644 |
--- a/net/spdy/spdy_framer_test.cc |
+++ b/net/spdy/spdy_framer_test.cc |
@@ -327,7 +327,11 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface, |
bool fin, |
bool unidirectional) OVERRIDE { |
++syn_frame_count_; |
- InitHeaderStreaming(SYN_STREAM, stream_id); |
+ if (framer_.protocol_version() > SPDY3) { |
+ InitHeaderStreaming(HEADERS, stream_id); |
+ } else { |
+ InitHeaderStreaming(SYN_STREAM, stream_id); |
+ } |
if (fin) { |
++fin_flag_count_; |
} |
@@ -335,7 +339,11 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface, |
virtual void OnSynReply(SpdyStreamId stream_id, bool fin) OVERRIDE { |
++syn_reply_frame_count_; |
- InitHeaderStreaming(SYN_REPLY, stream_id); |
+ if (framer_.protocol_version() > SPDY3) { |
+ InitHeaderStreaming(HEADERS, stream_id); |
+ } else { |
+ InitHeaderStreaming(SYN_REPLY, stream_id); |
+ } |
if (fin) { |
++fin_flag_count_; |
} |
@@ -459,8 +467,13 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface, |
void InitHeaderStreaming(SpdyFrameType header_control_type, |
SpdyStreamId stream_id) { |
- DCHECK_GE(header_control_type, FIRST_CONTROL_TYPE); |
- DCHECK_LE(header_control_type, LAST_CONTROL_TYPE); |
+ if (!SpdyConstants::IsValidFrameType(framer_.protocol_version(), |
+ SpdyConstants::SerializeFrameType(framer_.protocol_version(), |
+ header_control_type))) { |
+ DLOG(FATAL) << "Attempted to init header streaming with " |
+ << "invalid control frame type: " |
+ << header_control_type; |
+ } |
memset(header_buffer_.get(), 0, header_buffer_size_); |
header_buffer_length_ = 0; |
header_stream_id_ = stream_id; |
@@ -4317,8 +4330,6 @@ TEST_P(SpdyFramerTest, FrameTypeToStringTest) { |
SpdyFramer::FrameTypeToString(RST_STREAM)); |
EXPECT_STREQ("SETTINGS", |
SpdyFramer::FrameTypeToString(SETTINGS)); |
- EXPECT_STREQ("NOOP", |
- SpdyFramer::FrameTypeToString(NOOP)); |
EXPECT_STREQ("PING", |
SpdyFramer::FrameTypeToString(PING)); |
EXPECT_STREQ("GOAWAY", |