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

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

Issue 1079163008: PlzNavigate: provide the FrameTreeNode ID to the network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-unittests
Patch Set: Rebase + addressed Nasko's comments Created 5 years, 6 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
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/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 scoped_ptr<NavigationURLLoader> MakeTestLoader( 177 scoped_ptr<NavigationURLLoader> MakeTestLoader(
178 const GURL& url, 178 const GURL& url,
179 NavigationURLLoaderDelegate* delegate) { 179 NavigationURLLoaderDelegate* delegate) {
180 BeginNavigationParams begin_params( 180 BeginNavigationParams begin_params(
181 "GET", std::string(), net::LOAD_NORMAL, false); 181 "GET", std::string(), net::LOAD_NORMAL, false);
182 CommonNavigationParams common_params; 182 CommonNavigationParams common_params;
183 common_params.url = url; 183 common_params.url = url;
184 scoped_ptr<NavigationRequestInfo> request_info( 184 scoped_ptr<NavigationRequestInfo> request_info(
185 new NavigationRequestInfo(common_params, begin_params, url, true, false, 185 new NavigationRequestInfo(common_params, begin_params, url, true, false,
186 scoped_refptr<ResourceRequestBody>())); 186 -1, scoped_refptr<ResourceRequestBody>()));
187 187
188 return NavigationURLLoader::Create( 188 return NavigationURLLoader::Create(
189 browser_context_.get(), 0, request_info.Pass(), delegate); 189 browser_context_.get(), 0, request_info.Pass(), delegate);
190 } 190 }
191 191
192 // Helper function for fetching the body of a URL to a string. 192 // Helper function for fetching the body of a URL to a string.
193 std::string FetchURL(const GURL& url) { 193 std::string FetchURL(const GURL& url) {
194 net::TestDelegate delegate; 194 net::TestDelegate delegate;
195 net::URLRequestContext* request_context = 195 net::URLRequestContext* request_context =
196 browser_context_->GetResourceContext()->GetRequestContext(); 196 browser_context_->GetResourceContext()->GetRequestContext();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 // Release the body. 394 // Release the body.
395 delegate.ReleaseBody(); 395 delegate.ReleaseBody();
396 base::RunLoop().RunUntilIdle(); 396 base::RunLoop().RunUntilIdle();
397 397
398 // Verify that URLRequestTestJob no longer has anything paused. 398 // Verify that URLRequestTestJob no longer has anything paused.
399 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); 399 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage());
400 } 400 }
401 401
402 } // namespace content 402 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request_info.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