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

Unified Diff: net/spdy/spdy_stream_test_util.cc

Issue 10810069: SPDY: Add WriteHeaders interface to SpdySession and SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for commit Created 8 years, 5 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_stream_test_util.h ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream_test_util.cc
diff --git a/net/spdy/spdy_stream_test_util.cc b/net/spdy/spdy_stream_test_util.cc
index 93863d30d9369365b4e8735895ea8c0229a47d77..b973cf835e398fee2a85a5a352fa53f9f08b96e3 100644
--- a/net/spdy/spdy_stream_test_util.cc
+++ b/net/spdy/spdy_stream_test_util.cc
@@ -14,9 +14,11 @@ namespace test {
TestSpdyStreamDelegate::TestSpdyStreamDelegate(
SpdyStream* stream,
+ SpdyHeaderBlock* headers,
IOBufferWithSize* buf,
const CompletionCallback& callback)
: stream_(stream),
+ headers_(headers),
buf_(buf),
callback_(callback),
send_headers_completed_(false),
@@ -47,6 +49,10 @@ int TestSpdyStreamDelegate::OnResponseReceived(const SpdyHeaderBlock& response,
int status) {
EXPECT_TRUE(send_headers_completed_);
*response_ = response;
+ if (headers_.get()) {
+ EXPECT_EQ(ERR_IO_PENDING,
+ stream_->WriteHeaders(headers_.release()));
+ }
if (buf_) {
EXPECT_EQ(ERR_IO_PENDING,
stream_->WriteStreamData(buf_.get(), buf_->size(),
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698