diff options
author | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 17:50:51 +0000 |
---|---|---|
committer | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 17:50:51 +0000 |
commit | c30bcce5bcaac902a63146da6151494b832bac13 (patch) | |
tree | f33179c11efe6383ada786fb201fc4a3e5e543e3 /net/http/http_pipelined_host_impl_unittest.cc | |
parent | ebc463107e2892419d560195b8325ba4c3229599 (diff) | |
download | chromium_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_impl_unittest.cc')
-rw-r--r-- | net/http/http_pipelined_host_impl_unittest.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/http/http_pipelined_host_impl_unittest.cc b/net/http/http_pipelined_host_impl_unittest.cc index a428ae0..62fc36f 100644 --- a/net/http/http_pipelined_host_impl_unittest.cc +++ b/net/http/http_pipelined_host_impl_unittest.cc @@ -37,13 +37,14 @@ class MockHostDelegate : public HttpPipelinedHost::Delegate { class MockPipelineFactory : public HttpPipelinedConnection::Factory { public: - MOCK_METHOD6(CreateNewPipeline, HttpPipelinedConnection*( + MOCK_METHOD7(CreateNewPipeline, HttpPipelinedConnection*( ClientSocketHandle* connection, HttpPipelinedConnection::Delegate* delegate, 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)); }; class MockPipeline : public HttpPipelinedConnection { @@ -70,6 +71,7 @@ class MockPipeline : public HttpPipelinedConnection { MOCK_CONST_METHOD0(used_proxy_info, const ProxyInfo&()); MOCK_CONST_METHOD0(net_log, const BoundNetLog&()); MOCK_CONST_METHOD0(was_npn_negotiated, bool()); + MOCK_CONST_METHOD0(protocol_negotiated, SSLClientSocket::NextProto()); private: int depth_; @@ -96,14 +98,16 @@ class HttpPipelinedHostImplTest : public testing::Test { MockPipeline* pipeline = new MockPipeline(depth, usable, active); EXPECT_CALL(*factory_, CreateNewPipeline(kDummyConnection, host_.get(), Ref(ssl_config_), Ref(proxy_info_), - Ref(net_log_), true)) + Ref(net_log_), true, + SSLClientSocket::kProtoSPDY2)) .Times(1) .WillOnce(Return(pipeline)); EXPECT_CALL(*pipeline, CreateNewStream()) .Times(1) .WillOnce(Return(kDummyStream)); EXPECT_EQ(kDummyStream, host_->CreateStreamOnNewPipeline( - kDummyConnection, ssl_config_, proxy_info_, net_log_, true)); + kDummyConnection, ssl_config_, proxy_info_, net_log_, true, + SSLClientSocket::kProtoSPDY2)); return pipeline; } @@ -254,7 +258,8 @@ TEST_F(HttpPipelinedHostImplTest, ShutsDownOnOldVersion) { ClearTestPipeline(pipeline); EXPECT_EQ(NULL, host_->CreateStreamOnNewPipeline( - kDummyConnection, ssl_config_, proxy_info_, net_log_, true)); + kDummyConnection, ssl_config_, proxy_info_, net_log_, true, + SSLClientSocket::kProtoSPDY2)); } TEST_F(HttpPipelinedHostImplTest, ConnectionCloseHasNoEffect) { |