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

Unified Diff: net/http/http_stream_factory_impl_unittest.cc

Issue 2600943002: Cleanup the preconnect to proxy code and Job controller code (Closed)
Patch Set: rch comments Created 4 years 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/http/http_stream_factory_impl_job_controller_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_unittest.cc
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index a33649090be28b3467eada923cb91343779cb0e5..26b305abad77d6925dd0032049ef4ceb9575575e 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -14,7 +14,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
-#include "base/metrics/field_trial.h"
#include "base/run_loop.h"
#include "base/test/histogram_tester.h"
#include "net/base/port_util.h"
@@ -1218,13 +1217,9 @@ TEST_F(HttpStreamFactoryTest, QuicDisablePreConnectIfZeroRtt) {
}
}
-// Verify that the proxy delegate can disable preconnect jobs to only the proxy
-// servers that support request priorities.
-TEST_F(HttpStreamFactoryTest, ProxyDelegateDisablesPreconnect) {
- base::FieldTrialList field_trial_list(nullptr);
- base::FieldTrialList::CreateFieldTrial(
- "NetAllowOnlyOnePreconnectToProxyServers", "Enabled");
-
+// Verify that only one preconnect job succeeds to a proxy server that supports
+// request priorities.
+TEST_F(HttpStreamFactoryTest, OnlyOnePreconnectToProxyServer) {
for (bool set_http_server_properties : {false, true}) {
for (int num_streams = 1; num_streams < 3; ++num_streams) {
base::HistogramTester histogram_tester;
@@ -1245,6 +1240,7 @@ TEST_F(HttpStreamFactoryTest, ProxyDelegateDisablesPreconnect) {
params.enable_quic = true;
params.proxy_service = proxy_service.get();
params.http_server_properties = &http_server_properties;
+ ASSERT_TRUE(params.restrict_to_one_preconnect_for_proxies);
std::unique_ptr<HttpNetworkSession> session(
new HttpNetworkSession(params));
@@ -1610,10 +1606,6 @@ TEST_F(HttpStreamFactoryTest, RequestHttpStreamOverProxy) {
// Verifies that once a stream has been created to a proxy server (that supports
// request priorities) the next preconnect job can again open new sockets.
TEST_F(HttpStreamFactoryTest, RequestHttpStreamOverProxyWithPreconnects) {
- base::FieldTrialList field_trial_list(nullptr);
- base::FieldTrialList::CreateFieldTrial(
- "NetAllowOnlyOnePreconnectToProxyServers", "Enabled");
-
SpdySessionDependencies session_deps(
ProxyService::CreateFixed("https://myproxy.org:443"));
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller_unittest.cc ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698