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

Side by Side Diff: content/browser/loader/async_resource_handler_unittest.cc

Issue 2445993006: [WIP] Upgrade-insecure-request: upgrade insecurely-redirected requests.
Patch Set: bugfix Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/loader/async_resource_handler.h" 5 #include "content/browser/loader/async_resource_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 false, // do_not_prompt_for_login 181 false, // do_not_prompt_for_login
182 blink::WebReferrerPolicyDefault, // referrer_policy 182 blink::WebReferrerPolicyDefault, // referrer_policy
183 blink::WebPageVisibilityStateVisible, // visibility_state 183 blink::WebPageVisibilityStateVisible, // visibility_state
184 resource_context_.get(), // context 184 resource_context_.get(), // context
185 filter_->GetWeakPtr(), // filter 185 filter_->GetWeakPtr(), // filter
186 false, // report_raw_headers 186 false, // report_raw_headers
187 true, // is_async 187 true, // is_async
188 false, // is_using_lofi 188 false, // is_using_lofi
189 std::string(), // original_headers 189 std::string(), // original_headers
190 nullptr, // body 190 nullptr, // body
191 false); // initiated_in_secure_context 191 false, // initiated_in_secure_context
192 blink::kLeaveInsecureRequestsAlone); // insecure_request_policy
192 info->AssociateWithRequest(request.get()); 193 info->AssociateWithRequest(request.get());
193 std::unique_ptr<AsyncResourceHandler> handler = 194 std::unique_ptr<AsyncResourceHandler> handler =
194 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_); 195 base::MakeUnique<AsyncResourceHandler>(request.get(), &rdh_);
195 loader_ = base::MakeUnique<ResourceLoader>( 196 loader_ = base::MakeUnique<ResourceLoader>(
196 std::move(request), std::move(handler), this); 197 std::move(request), std::move(handler), this);
197 } 198 }
198 199
199 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) { 200 void StartRequestAndWaitWithResponseDataSize(size_t response_data_size) {
200 CreateRequestWithResponseDataSize(response_data_size); 201 CreateRequestWithResponseDataSize(response_data_size);
201 loader_->StartRequest(); 202 loader_->StartRequest();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 303
303 encoded_data_length = std::get<3>(params); 304 encoded_data_length = std::get<3>(params);
304 EXPECT_EQ(32768, encoded_data_length); 305 EXPECT_EQ(32768, encoded_data_length);
305 encoded_body_length = std::get<4>(params); 306 encoded_body_length = std::get<4>(params);
306 EXPECT_EQ(32768, encoded_body_length); 307 EXPECT_EQ(32768, encoded_body_length);
307 } 308 }
308 309
309 } // namespace 310 } // namespace
310 311
311 } // namespace content 312 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request_info.cc ('k') | content/browser/loader/navigation_url_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698