summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_test_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/spdy/spdy_test_util.h')
-rw-r--r--net/spdy/spdy_test_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/spdy/spdy_test_util.h b/net/spdy/spdy_test_util.h
index ec60a30..e7df3f67 100644
--- a/net/spdy/spdy_test_util.h
+++ b/net/spdy/spdy_test_util.h
@@ -23,6 +23,12 @@
namespace net {
+// Default upload data used by both, mock objects and framer when creating
+// data frames.
+const char kDefaultURL[] = "http://www.google.com";
+const char kUploadData[] = "hello!";
+const int kUploadDataSize = arraysize(kUploadData)-1;
+
// NOTE: In GCC, on a Mac, this can't be in an anonymous namespace!
// This struct holds information used to construct spdy control and data frames.
struct SpdyHeaderInfo {
@@ -250,6 +256,10 @@ spdy::SpdyFrame* ConstructSpdyPostSynReply(const char* const extra_headers[],
spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id,
bool fin);
+// Constructs a single SPDY data frame with the given content.
+spdy::SpdyFrame* ConstructSpdyBodyFrame(int stream_id, const char* data,
+ uint32 len, bool fin);
+
// Create an async MockWrite from the given SpdyFrame.
MockWrite CreateMockWrite(const spdy::SpdyFrame& req);