Index: net/spdy/spdy_test_util.cc |
diff --git a/net/spdy/spdy_test_util.cc b/net/spdy/spdy_test_util.cc |
index 697a3a6dd37cb36f5deef83ee7e1dfbfce330db5..89e3343eb5986922e1bd1e222fd891ad43fb9cf3 100644 |
--- a/net/spdy/spdy_test_util.cc |
+++ b/net/spdy/spdy_test_util.cc |
@@ -4,6 +4,8 @@ |
#include "net/spdy/spdy_test_util.h" |
+#include <string> |
+ |
#include "base/basictypes.h" |
#include "base/string_util.h" |
@@ -235,12 +237,15 @@ int ConstructSpdyHeader(const char* const extra_headers[], |
// will vary the most between calls. |
// Returns a SpdyFrame. |
spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
- int extra_header_count, bool compressed) { |
+ int extra_header_count, |
+ bool compressed, |
+ int stream_id, |
+ RequestPriority request_priority) { |
const SpdyHeaderInfo kSynStartHeader = { |
spdy::SYN_STREAM, // Kind = Syn |
- 1, // Stream ID |
+ stream_id, // Stream ID |
0, // Associated stream ID |
- SPDY_PRIORITY_LOWEST, // Priority |
+ request_priority, // Priority |
spdy::CONTROL_FLAG_FIN, // Control Flags |
compressed, // Compressed |
spdy::INVALID, // Status |
@@ -264,24 +269,16 @@ spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
arraysize(kStandardGetHeaders) / 2); |
} |
-// Constructs a standard SPDY GET SYN packet, not compressed. |
-// |extra_headers| are the extra header-value pairs, which typically |
-// will vary the most between calls. |
-// Returns a SpdyFrame. |
-spdy::SpdyFrame* ConstructSpdyGet(const char* const extra_headers[], |
- int extra_header_count) { |
- return ConstructSpdyGet(extra_headers, extra_header_count, false); |
-} |
- |
// Constructs a standard SPDY SYN_REPLY packet to match the SPDY GET. |
// |extra_headers| are the extra header-value pairs, which typically |
// will vary the most between calls. |
// Returns a SpdyFrame. |
spdy::SpdyFrame* ConstructSpdyGetSynReply(const char* const extra_headers[], |
- int extra_header_count) { |
+ int extra_header_count, |
+ int stream_id) { |
const SpdyHeaderInfo kSynStartHeader = { |
spdy::SYN_REPLY, // Kind = SynReply |
- 1, // Stream ID |
+ stream_id, // Stream ID |
0, // Associated stream ID |
SPDY_PRIORITY_LOWEST, // Priority |
spdy::CONTROL_FLAG_NONE, // Control Flags |
@@ -380,9 +377,11 @@ spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[], |
} |
// Constructs a single SPDY data frame with the contents "hello!" |
-spdy::SpdyFrame* ConstructSpdyBodyFrame() { |
+spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, bool fin) { |
spdy::SpdyFramer framer; |
- return framer.CreateDataFrame(1, "hello!", 6, spdy::DATA_FLAG_FIN); |
+ return |
+ framer.CreateDataFrame(stream_id, "hello!", 6, |
+ fin ? spdy::DATA_FLAG_FIN : spdy::DATA_FLAG_NONE); |
} |
// Construct an expected SPDY reply string. |