Chromium Code Reviews| Index: net/http/http_proxy_client_socket_pool_unittest.cc |
| diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc |
| index 97d7270fa670dc62afcdd4e7555178c27c10c045..6e01cdd0735ce13d4a481e2c3ab5171f18caeee0 100644 |
| --- a/net/http/http_proxy_client_socket_pool_unittest.cc |
| +++ b/net/http/http_proxy_client_socket_pool_unittest.cc |
| @@ -61,97 +61,6 @@ typedef ::testing::TestWithParam<HttpProxyType> TestWithHttpParam; |
| const char kHttpProxyHost[] = "httpproxy.example.com"; |
| const char kHttpsProxyHost[] = "httpsproxy.example.com"; |
| -class TestProxyDelegate : public ProxyDelegate { |
|
bengr
2016/01/26 23:23:26
This has nothing to do with this CL. Please do thi
tbansal1
2016/01/27 00:13:34
This has been moved to net/spdy/spdy_test_util_co
|
| - public: |
| - TestProxyDelegate() |
| - : on_before_tunnel_request_called_(false), |
| - on_tunnel_request_completed_called_(false), |
| - on_tunnel_headers_received_called_(false) { |
| - } |
| - |
| - ~TestProxyDelegate() override {} |
| - |
| - bool on_before_tunnel_request_called() const { |
| - return on_before_tunnel_request_called_; |
| - } |
| - |
| - bool on_tunnel_request_completed_called() const { |
| - return on_tunnel_request_completed_called_; |
| - } |
| - |
| - bool on_tunnel_headers_received_called() const { |
| - return on_tunnel_headers_received_called_; |
| - } |
| - |
| - void VerifyOnTunnelRequestCompleted(const std::string& endpoint, |
| - const std::string& proxy_server) const { |
| - EXPECT_TRUE(on_tunnel_request_completed_called_); |
| - EXPECT_TRUE(HostPortPair::FromString(endpoint).Equals( |
| - on_tunnel_request_completed_endpoint_)); |
| - EXPECT_TRUE(HostPortPair::FromString(proxy_server).Equals( |
| - on_tunnel_request_completed_proxy_server_)); |
| - } |
| - |
| - void VerifyOnTunnelHeadersReceived(const std::string& origin, |
| - const std::string& proxy_server, |
| - const std::string& status_line) const { |
| - EXPECT_TRUE(on_tunnel_headers_received_called_); |
| - EXPECT_TRUE(HostPortPair::FromString(origin).Equals( |
| - on_tunnel_headers_received_origin_)); |
| - EXPECT_TRUE(HostPortPair::FromString(proxy_server).Equals( |
| - on_tunnel_headers_received_proxy_server_)); |
| - EXPECT_EQ(status_line, on_tunnel_headers_received_status_line_); |
| - } |
| - |
| - // ProxyDelegate: |
| - void OnResolveProxy(const GURL& url, |
| - int load_flags, |
| - const ProxyService& proxy_service, |
| - ProxyInfo* result) override {} |
| - |
| - void OnTunnelConnectCompleted(const HostPortPair& endpoint, |
| - const HostPortPair& proxy_server, |
| - int net_error) override { |
| - on_tunnel_request_completed_called_ = true; |
| - on_tunnel_request_completed_endpoint_ = endpoint; |
| - on_tunnel_request_completed_proxy_server_ = proxy_server; |
| - } |
| - |
| - void OnFallback(const ProxyServer& bad_proxy, int net_error) override {} |
| - |
| - void OnBeforeSendHeaders(URLRequest* request, |
| - const ProxyInfo& proxy_info, |
| - HttpRequestHeaders* headers) override {} |
| - |
| - void OnBeforeTunnelRequest(const HostPortPair& proxy_server, |
| - HttpRequestHeaders* extra_headers) override { |
| - on_before_tunnel_request_called_ = true; |
| - if (extra_headers) { |
| - extra_headers->SetHeader("Foo", proxy_server.ToString()); |
| - } |
| - } |
| - |
| - void OnTunnelHeadersReceived( |
| - const HostPortPair& origin, |
| - const HostPortPair& proxy_server, |
| - const HttpResponseHeaders& response_headers) override { |
| - on_tunnel_headers_received_called_ = true; |
| - on_tunnel_headers_received_origin_ = origin; |
| - on_tunnel_headers_received_proxy_server_ = proxy_server; |
| - on_tunnel_headers_received_status_line_ = response_headers.GetStatusLine(); |
| - } |
| - |
| - private: |
| - bool on_before_tunnel_request_called_; |
| - bool on_tunnel_request_completed_called_; |
| - bool on_tunnel_headers_received_called_; |
| - HostPortPair on_tunnel_request_completed_endpoint_; |
| - HostPortPair on_tunnel_request_completed_proxy_server_; |
| - HostPortPair on_tunnel_headers_received_origin_; |
| - HostPortPair on_tunnel_headers_received_proxy_server_; |
| - std::string on_tunnel_headers_received_status_line_; |
| -}; |
| - |
| } // namespace |
| class HttpProxyClientSocketPoolTest |