summaryrefslogtreecommitdiffstats
path: root/net/http/http_pipelined_host_pool_unittest.cc
diff options
context:
space:
mode:
authorrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 17:50:51 +0000
committerrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 17:50:51 +0000
commitc30bcce5bcaac902a63146da6151494b832bac13 (patch)
treef33179c11efe6383ada786fb201fc4a3e5e543e3 /net/http/http_pipelined_host_pool_unittest.cc
parentebc463107e2892419d560195b8325ba4c3229599 (diff)
downloadchromium_src-c30bcce5bcaac902a63146da6151494b832bac13.zip
chromium_src-c30bcce5bcaac902a63146da6151494b832bac13.tar.gz
chromium_src-c30bcce5bcaac902a63146da6151494b832bac13.tar.bz2
Added protocol_version negotiated with the server.
protocol_version will be printed by the LoadTimes extension. R=willchan BUG=108134 TEST=network unittests Review URL: http://codereview.chromium.org/8914005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_pipelined_host_pool_unittest.cc')
-rw-r--r--net/http/http_pipelined_host_pool_unittest.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/net/http/http_pipelined_host_pool_unittest.cc b/net/http/http_pipelined_host_pool_unittest.cc
index db47064..27f9bd4 100644
--- a/net/http/http_pipelined_host_pool_unittest.cc
+++ b/net/http/http_pipelined_host_pool_unittest.cc
@@ -47,12 +47,13 @@ class MockHost : public HttpPipelinedHost {
: origin_(origin) {
}
- MOCK_METHOD5(CreateStreamOnNewPipeline, HttpPipelinedStream*(
+ MOCK_METHOD6(CreateStreamOnNewPipeline, HttpPipelinedStream*(
ClientSocketHandle* connection,
const SSLConfig& used_ssl_config,
const ProxyInfo& used_proxy_info,
const BoundNetLog& net_log,
- bool was_npn_negotiated));
+ bool was_npn_negotiated,
+ SSLClientSocket::NextProto protocol_negotiated));
MOCK_METHOD0(CreateStreamOnExistingPipeline, HttpPipelinedStream*());
MOCK_CONST_METHOD0(IsExistingPipelineAvailable, bool());
@@ -71,7 +72,8 @@ class HttpPipelinedHostPoolTest : public testing::Test {
http_server_properties_(new HttpServerPropertiesImpl),
pool_(new HttpPipelinedHostPool(&delegate_, factory_,
http_server_properties_.get())),
- was_npn_negotiated_(false) {
+ was_npn_negotiated_(false),
+ protocol_negotiated_(SSLClientSocket::kProtoUnknown) {
}
void CreateDummyStream() {
@@ -79,13 +81,15 @@ class HttpPipelinedHostPoolTest : public testing::Test {
Ref(ssl_config_),
Ref(proxy_info_),
Ref(net_log_),
- was_npn_negotiated_))
+ was_npn_negotiated_,
+ protocol_negotiated_))
.Times(1)
.WillOnce(Return(kDummyStream));
EXPECT_EQ(kDummyStream,
pool_->CreateStreamOnNewPipeline(origin_, kDummyConnection,
ssl_config_, proxy_info_,
- net_log_, was_npn_negotiated_));
+ net_log_, was_npn_negotiated_,
+ protocol_negotiated_));
}
HostPortPair origin_;
@@ -99,6 +103,7 @@ class HttpPipelinedHostPoolTest : public testing::Test {
const ProxyInfo proxy_info_;
const BoundNetLog net_log_;
bool was_npn_negotiated_;
+ SSLClientSocket::NextProto protocol_negotiated_;
};
TEST_F(HttpPipelinedHostPoolTest, DefaultUnknown) {
@@ -128,7 +133,8 @@ TEST_F(HttpPipelinedHostPoolTest, RemembersIncapable) {
EXPECT_EQ(NULL,
pool_->CreateStreamOnNewPipeline(origin_, kDummyConnection,
ssl_config_, proxy_info_, net_log_,
- was_npn_negotiated_));
+ was_npn_negotiated_,
+ protocol_negotiated_));
}
TEST_F(HttpPipelinedHostPoolTest, RemembersCapable) {