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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 959743002: Account for HTTP/2 padding in receive windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more mock implementation. Created 5 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
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 48c50d41ecfa1c88363e8f05965d5cecb5e92557..becdb9102ccd71dbd853e66a0874a7ee1498036c 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -243,6 +243,7 @@ class PriorityGetter : public BufferedSpdyFramerVisitorInterface {
const char* data,
size_t len,
bool fin) override {}
+ void OnStreamPadding(SpdyStreamId stream_id, size_t len) override {}
void OnSettings(bool clear_persisted) override {}
void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) override {}
void OnPing(SpdyPingId unique_id, bool is_ack) override {}
@@ -1224,6 +1225,18 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyBodyFrame(int stream_id,
return framer.SerializeData(data_ir);
}
+SpdyFrame* SpdyTestUtil::ConstructSpdyBodyFrame(int stream_id,
+ const char* data,
+ uint32 len,
+ bool fin,
+ int padding_length) {
+ SpdyFramer framer(spdy_version_);
+ SpdyDataIR data_ir(stream_id, base::StringPiece(data, len));
+ data_ir.set_fin(fin);
+ data_ir.set_padding_len(padding_length);
+ return framer.SerializeData(data_ir);
+}
+
SpdyFrame* SpdyTestUtil::ConstructWrappedSpdyFrame(
const scoped_ptr<SpdyFrame>& frame,
int stream_id) {
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/tools/flip_server/spdy_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698