OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::string() /* user_agent */)); | 103 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_FALSE(http_params->enable_spdy31); | 110 EXPECT_FALSE(http_params->enable_spdy31); |
111 EXPECT_FALSE(http_params->enable_http2); | 111 EXPECT_FALSE(http_params->enable_http2); |
112 EXPECT_TRUE(http_params->parse_alternative_services); | 112 EXPECT_TRUE(http_params->parse_alternative_services); |
113 EXPECT_FALSE(http_params->enable_alternative_service_with_different_host); | 113 EXPECT_TRUE(http_params->enable_alternative_service_with_different_host); |
114 EXPECT_FALSE(http_params->enable_quic); | 114 EXPECT_FALSE(http_params->enable_quic); |
115 | 115 |
116 // Check that io_data creates an interceptor. Such an interceptor is | 116 // Check that io_data creates an interceptor. Such an interceptor is |
117 // thoroughly tested by DataReductionProxyInterceptoTest. | 117 // thoroughly tested by DataReductionProxyInterceptoTest. |
118 std::unique_ptr<net::URLRequestInterceptor> interceptor = | 118 std::unique_ptr<net::URLRequestInterceptor> interceptor = |
119 io_data->CreateInterceptor(); | 119 io_data->CreateInterceptor(); |
120 EXPECT_NE(nullptr, interceptor.get()); | 120 EXPECT_NE(nullptr, interceptor.get()); |
121 | 121 |
122 // When creating a network delegate, expect that it properly wraps a | 122 // When creating a network delegate, expect that it properly wraps a |
123 // network delegate. Such a network delegate is thoroughly tested by | 123 // network delegate. Such a network delegate is thoroughly tested by |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // Turn Data Saver off. | 182 // Turn Data Saver off. |
183 drp_test_context->settings()->SetDataReductionProxyEnabled(false); | 183 drp_test_context->settings()->SetDataReductionProxyEnabled(false); |
184 base::RunLoop().RunUntilIdle(); | 184 base::RunLoop().RunUntilIdle(); |
185 | 185 |
186 // Verify that bad proxy list is empty. | 186 // Verify that bad proxy list is empty. |
187 EXPECT_EQ(0UL, bad_proxy_list.size()); | 187 EXPECT_EQ(0UL, bad_proxy_list.size()); |
188 } | 188 } |
189 | 189 |
190 } // namespace data_reduction_proxy | 190 } // namespace data_reduction_proxy |
OLD | NEW |