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

Unified Diff: net/spdy/spdy_test_util_spdy2.h

Issue 12743006: [SPDY] Refactor tests in preparation for a fix for a session flow control bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
Index: net/spdy/spdy_test_util_spdy2.h
diff --git a/net/spdy/spdy_test_util_spdy2.h b/net/spdy/spdy_test_util_spdy2.h
index a4d0542480a052b0788a340fc8458f0c64e43702..3d98ce7120ad2c7d37ad8cc9b8dfad5548ccf0b0 100644
--- a/net/spdy/spdy_test_util_spdy2.h
+++ b/net/spdy/spdy_test_util_spdy2.h
@@ -6,6 +6,8 @@
#define NET_SPDY_SPDY_TEST_UTIL_SPDY2_H_
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/string_piece.h"
#include "net/base/cert_verifier.h"
#include "net/base/host_port_pair.h"
#include "net/base/mock_host_resolver.h"
@@ -75,9 +77,12 @@ MockRead* ChopReadFrame(const SpdyFrame& frame, int num_chunks);
// where the even entries are the header names, and the odd entries are the
// header values.
// |headers| gets filled in from |extra_headers|.
-void AppendHeadersToSpdyFrame(const char* const extra_headers[],
- int extra_header_count,
- SpdyHeaderBlock* headers);
+void AppendToHeaderBlock(const char* const extra_headers[],
+ int extra_header_count,
+ SpdyHeaderBlock* headers);
+
+// Constructs a HeaderBlock for the given URL.
+scoped_ptr<SpdyHeaderBlock> ConstructHeaderBlock(base::StringPiece url);
// Writes |str| of the given |len| to the buffer pointed to by |buffer_handle|.
// Uses a template so buffer_handle can be a char* or an unsigned char*.
@@ -110,12 +115,13 @@ int AppendToBuffer(int val,
int* buffer_len_remaining);
// Construct a SPDY packet.
-// |head| is the start of the packet, up to but not including
-// the header value pairs.
+SpdyFrame* ConstructSpdyPacket(const SpdyHeaderInfo& header_info,
Ryan Hamilton 2013/03/14 15:29:45 Yak: Can you rename this to ConstructSpdyFrame (or
akalin 2013/03/15 17:28:56 Done. search-and-replaced packet with frame in a b
+ scoped_ptr<SpdyHeaderBlock> headers);
+
+// Construct a SPDY packet.
// |extra_headers| are the extra header-value pairs, which typically
// will vary the most between calls.
// |tail| is any (relatively constant) header-value pairs to add.
-// |buffer| is the buffer we're filling in.
// Returns a SpdyFrame.
SpdyFrame* ConstructSpdyPacket(const SpdyHeaderInfo& header_info,
const char* const extra_headers[],

Powered by Google App Engine
This is Rietveld 408576698