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

Unified Diff: net/spdy/chromium/spdy_session_unittest.cc

Issue 2909653002: SpdySession: Combine three frames into a single packet. (Closed)
Patch Set: Combine frames in tests. Created 3 years, 6 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/chromium/spdy_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/chromium/spdy_session_unittest.cc
diff --git a/net/spdy/chromium/spdy_session_unittest.cc b/net/spdy/chromium/spdy_session_unittest.cc
index ee9749bc983c0c70286836b9b208434390fb91a3..ce7b9dd5b20192b3f43a01d52c81ad7516bdb1ff 100644
--- a/net/spdy/chromium/spdy_session_unittest.cc
+++ b/net/spdy/chromium/spdy_session_unittest.cc
@@ -5511,11 +5511,17 @@ class SendInitialSettingsOnNewSpdySessionTest : public SpdySessionTest {
MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING)};
+ SpdySerializedFrame preface(const_cast<char*>(kHttp2ConnectionHeaderPrefix),
+ kHttp2ConnectionHeaderPrefixSize,
+ /* owns_buffer = */ false);
SpdySerializedFrame settings_frame(
spdy_util_.ConstructSpdySettings(expected_settings));
- MockWrite writes[] = {MockWrite(ASYNC, kHttp2ConnectionHeaderPrefix,
- kHttp2ConnectionHeaderPrefixSize),
- CreateMockWrite(settings_frame)};
+ const SpdySerializedFrame* frames[2] = {&preface, &settings_frame};
+ char combined_frames[100];
+ int combined_frames_len = CombineFrames(
+ frames, arraysize(frames), combined_frames, arraysize(combined_frames));
+ MockWrite writes[] = {
+ MockWrite(ASYNC, combined_frames, combined_frames_len)};
StaticSocketDataProvider data(reads, arraysize(reads), writes,
arraysize(writes));
« no previous file with comments | « net/spdy/chromium/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698