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

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

Issue 1999943002: Moving HTTP POST body from StartNavigationParams to CommonNavigationParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from clamy@. Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 std::unique_ptr<NavigationURLLoader> MakeTestLoader( 104 std::unique_ptr<NavigationURLLoader> MakeTestLoader(
105 const GURL& url, 105 const GURL& url,
106 NavigationURLLoaderDelegate* delegate) { 106 NavigationURLLoaderDelegate* delegate) {
107 BeginNavigationParams begin_params(std::string(), net::LOAD_NORMAL, false, 107 BeginNavigationParams begin_params(std::string(), net::LOAD_NORMAL, false,
108 false, REQUEST_CONTEXT_TYPE_LOCATION); 108 false, REQUEST_CONTEXT_TYPE_LOCATION);
109 CommonNavigationParams common_params; 109 CommonNavigationParams common_params;
110 common_params.url = url; 110 common_params.url = url;
111 std::unique_ptr<NavigationRequestInfo> request_info( 111 std::unique_ptr<NavigationRequestInfo> request_info(
112 new NavigationRequestInfo(common_params, begin_params, url, 112 new NavigationRequestInfo(common_params, begin_params, url,
113 url::Origin(url), true, false, -1, 113 url::Origin(url), true, false, -1));
114 scoped_refptr<ResourceRequestBody>()));
115 114
116 return NavigationURLLoader::Create( 115 return NavigationURLLoader::Create(
117 browser_context_.get(), std::move(request_info), nullptr, delegate); 116 browser_context_.get(), std::move(request_info), nullptr, delegate);
118 } 117 }
119 118
120 // Helper function for fetching the body of a URL to a string. 119 // Helper function for fetching the body of a URL to a string.
121 std::string FetchURL(const GURL& url) { 120 std::string FetchURL(const GURL& url) {
122 net::TestDelegate delegate; 121 net::TestDelegate delegate;
123 net::URLRequestContext* request_context = 122 net::URLRequestContext* request_context =
124 browser_context_->GetResourceContext()->GetRequestContext(); 123 browser_context_->GetResourceContext()->GetRequestContext();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 328
330 // Release the body. 329 // Release the body.
331 delegate.ReleaseBody(); 330 delegate.ReleaseBody();
332 base::RunLoop().RunUntilIdle(); 331 base::RunLoop().RunUntilIdle();
333 332
334 // Verify that URLRequestTestJob no longer has anything paused. 333 // Verify that URLRequestTestJob no longer has anything paused.
335 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); 334 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage());
336 } 335 }
337 336
338 } // namespace content 337 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698