diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:19:17 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:19:17 +0000 |
commit | 4c21b0f14edcb3bfc2c5c481428fe71bb9107817 (patch) | |
tree | e3db730ecdb981b0c66035c6d3efc7431008a778 /net/spdy/spdy_test_util.cc | |
parent | 1655ba34a9191e59006bd7a48eb25b98319352e7 (diff) | |
download | chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.zip chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.tar.gz chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.tar.bz2 |
SPDY: Initial support for handling WINDOW_UPDATE frames and some cleanup.
BUG=48100
TEST=net_unittests --gtest_filter="SpdyProtocolTest.ControlFrameStructs:SpdyNetworkTransactionTest.WindowSizeChange:SpdyNetworkTransactionTest.WindowSizeOverflow"
Contributed by: agayev@google.com
Review URL: http://codereview.chromium.org/2807042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_test_util.cc')
-rw-r--r-- | net/spdy/spdy_test_util.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/spdy/spdy_test_util.cc b/net/spdy/spdy_test_util.cc index 697a3a6..87da61b 100644 --- a/net/spdy/spdy_test_util.cc +++ b/net/spdy/spdy_test_util.cc @@ -190,6 +190,22 @@ spdy::SpdyFrame* ConstructSpdyGoAway() { return framer.CreateGoAway(0); } +// Construct a SPDY WINDOW_UPDATE frame. +// Returns the constructed frame. The caller takes ownership of the frame. +spdy::SpdyFrame* ConstructSpdyWindowUpdate( + const spdy::SpdyStreamId stream_id, uint32 delta_window_size) { + spdy::SpdyFramer framer; + return framer.CreateWindowUpdate(stream_id, delta_window_size); +} + +// Construct a SPDY RST_STREAM frame. +// Returns the constructed frame. The caller takes ownership of the frame. +spdy::SpdyFrame* ConstructSpdyRstStream(spdy::SpdyStreamId stream_id, + spdy::SpdyStatusCodes status) { + spdy::SpdyFramer framer; + return framer.CreateRstStream(stream_id, status); +} + // Construct a single SPDY header entry, for validation. // |extra_headers| are the extra header-value pairs. // |buffer| is the buffer we're filling in. |