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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc

Issue 1268313004: s/use_alternate_protocols/use_alternative_services/g (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #15. Created 5 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « chromecast/browser/url_request_context_factory.cc ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 scoped_ptr<DataReductionProxyIOData> io_data(new DataReductionProxyIOData( 100 scoped_ptr<DataReductionProxyIOData> io_data(new DataReductionProxyIOData(
101 Client::UNKNOWN, DataReductionProxyParams::kAllowed, net_log(), 101 Client::UNKNOWN, DataReductionProxyParams::kAllowed, net_log(),
102 task_runner(), task_runner(), false /* enabled */, 102 task_runner(), task_runner(), false /* enabled */,
103 false /* enable_quic */, std::string() /* user_agent */)); 103 false /* enable_quic */, std::string() /* user_agent */));
104 104
105 // Check that the SimpleURLRequestContextGetter uses vanilla HTTP. 105 // Check that the SimpleURLRequestContextGetter uses vanilla HTTP.
106 net::URLRequestContext* request_context = 106 net::URLRequestContext* request_context =
107 io_data->basic_url_request_context_getter_.get()->GetURLRequestContext(); 107 io_data->basic_url_request_context_getter_.get()->GetURLRequestContext();
108 const net::HttpNetworkSession::Params* http_params = 108 const net::HttpNetworkSession::Params* http_params =
109 request_context->GetNetworkSessionParams(); 109 request_context->GetNetworkSessionParams();
110 EXPECT_TRUE(http_params->use_alternate_protocols); 110 EXPECT_TRUE(http_params->use_alternative_services);
111 EXPECT_FALSE(http_params->enable_quic); 111 EXPECT_FALSE(http_params->enable_quic);
112 net::NextProtoVector expected_protos = 112 net::NextProtoVector expected_protos =
113 net::NextProtosWithSpdyAndQuic(false, false); 113 net::NextProtosWithSpdyAndQuic(false, false);
114 EXPECT_EQ(expected_protos.size(), http_params->next_protos.size()); 114 EXPECT_EQ(expected_protos.size(), http_params->next_protos.size());
115 size_t proto_index = 0; 115 size_t proto_index = 0;
116 for (const auto& proto : expected_protos) 116 for (const auto& proto : expected_protos)
117 EXPECT_EQ(proto, http_params->next_protos[proto_index++]); 117 EXPECT_EQ(proto, http_params->next_protos[proto_index++]);
118 118
119 // Check that io_data creates an interceptor. Such an interceptor is 119 // Check that io_data creates an interceptor. Such an interceptor is
120 // thoroughly tested by DataReductionProxyInterceptoTest. 120 // thoroughly tested by DataReductionProxyInterceptoTest.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 // Turn Data Saver off. 188 // Turn Data Saver off.
189 drp_test_context->settings()->SetDataReductionProxyEnabled(false); 189 drp_test_context->settings()->SetDataReductionProxyEnabled(false);
190 base::RunLoop().RunUntilIdle(); 190 base::RunLoop().RunUntilIdle();
191 191
192 // Verify that bad proxy list is empty. 192 // Verify that bad proxy list is empty.
193 EXPECT_EQ(0UL, bad_proxy_list.size()); 193 EXPECT_EQ(0UL, bad_proxy_list.size());
194 } 194 }
195 195
196 } // namespace data_reduction_proxy 196 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « chromecast/browser/url_request_context_factory.cc ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698