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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 17028007: Merge the HttpNetworkTransaction tests and parametrize them on a NextProto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/spdy_test_util_common.h ('k') | no next file » | 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 8ad49ccf38ad609bf2ac35c70994869650da3a9e..ae9cc0194fbb1a4eb1c59556bedeb3b8cec8f18f 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -562,6 +562,22 @@ scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlock(
return header_block.Pass();
}
+scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructGetHeaderBlockForProxy(
+ base::StringPiece url) const {
+ std::string scheme, host, path;
+ ParseUrl(url.data(), &scheme, &host, &path);
+ const char* const headers[] = {
+ GetMethodKey(), "GET",
+ GetPathKey(), is_spdy2() ? url.data() : path.c_str(),
+ GetHostKey(), host.c_str(),
+ GetSchemeKey(), scheme.c_str(),
+ GetVersionKey(), "HTTP/1.1"
+ };
+ scoped_ptr<SpdyHeaderBlock> header_block(new SpdyHeaderBlock());
+ AppendToHeaderBlock(headers, arraysize(headers) / 2, header_block.get());
+ return header_block.Pass();
+}
+
scoped_ptr<SpdyHeaderBlock> SpdyTestUtil::ConstructPostHeaderBlock(
base::StringPiece url,
int64 content_length) const {
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698