| 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 651d171a69181a034ca03a5e374c1e010cc39f18..e05b2038caa83631fcd63cff2bd2ccbf570ab46b 100644
|
| --- a/net/http/http_proxy_client_socket_pool_unittest.cc
|
| +++ b/net/http/http_proxy_client_socket_pool_unittest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "net/http/http_proxy_client_socket.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "net/log/net_log_with_source.h"
|
| +#include "net/nqe/network_quality_estimator_test_util.h"
|
| #include "net/socket/client_socket_handle.h"
|
| #include "net/socket/next_proto.h"
|
| #include "net/socket/socket_test_util.h"
|
| @@ -78,6 +79,7 @@ class HttpProxyClientSocketPoolTest
|
| kMaxSocketsPerGroup,
|
| &transport_socket_pool_,
|
| &ssl_socket_pool_,
|
| + &estimator_,
|
| NULL) {
|
| session_ = CreateNetworkSession();
|
| }
|
| @@ -197,6 +199,8 @@ class HttpProxyClientSocketPoolTest
|
| private:
|
| SpdySessionDependencies session_deps_;
|
|
|
| + TestNetworkQualityEstimator estimator_;
|
| +
|
| MockTransportClientSocketPool transport_socket_pool_;
|
| MockHostResolver host_resolver_;
|
| std::unique_ptr<CertVerifier> cert_verifier_;
|
| @@ -722,6 +726,18 @@ TEST_P(HttpProxyClientSocketPoolTest, TunnelSetupRedirect) {
|
| }
|
| }
|
|
|
| +TEST_P(HttpProxyClientSocketPoolTest, ProxyPoolTimeout) {
|
| + ASSERT_LE(base::TimeDelta(), pool_.ConnectionTimeout());
|
| +
|
| + // Test against a large value.
|
| + ASSERT_GE(base::TimeDelta::FromMinutes(10), pool_.ConnectionTimeout());
|
| +
|
| +#if (defined(OS_ANDROID) || defined(OS_IOS))
|
| + // On Android and iOS, the timeout is fixed to 10 seconds.
|
| + ASSERT_EQ(base::TimeDelta::FromSeconds(10), pool_.ConnectionTimeout());
|
| +#endif
|
| +}
|
| +
|
| // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
|
|
|
| } // namespace net
|
|
|