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

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

Issue 2776523005: Plumbing devtools agent host id and request id between processes (Closed)
Patch Set: Rebased Created 3 years, 8 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 | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('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 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 NavigationURLLoaderDelegate* delegate) { 108 NavigationURLLoaderDelegate* delegate) {
109 BeginNavigationParams begin_params( 109 BeginNavigationParams begin_params(
110 std::string(), net::LOAD_NORMAL, false, false, 110 std::string(), net::LOAD_NORMAL, false, false,
111 REQUEST_CONTEXT_TYPE_LOCATION, 111 REQUEST_CONTEXT_TYPE_LOCATION,
112 blink::WebMixedContentContextType::kBlockable, 112 blink::WebMixedContentContextType::kBlockable,
113 false, // is_form_submission 113 false, // is_form_submission
114 url::Origin(url)); 114 url::Origin(url));
115 CommonNavigationParams common_params; 115 CommonNavigationParams common_params;
116 common_params.url = url; 116 common_params.url = url;
117 std::unique_ptr<NavigationRequestInfo> request_info( 117 std::unique_ptr<NavigationRequestInfo> request_info(
118 new NavigationRequestInfo(common_params, begin_params, url, true, false, 118 new NavigationRequestInfo(
119 false, -1, false, false, 119 common_params, begin_params, url, true, false, false, -1, false,
120 blink::kWebPageVisibilityStateVisible)); 120 false, blink::kWebPageVisibilityStateVisible, "", 0));
121 return NavigationURLLoader::Create( 121 return NavigationURLLoader::Create(
122 browser_context_->GetResourceContext(), 122 browser_context_->GetResourceContext(),
123 BrowserContext::GetDefaultStoragePartition(browser_context_.get()), 123 BrowserContext::GetDefaultStoragePartition(browser_context_.get()),
124 std::move(request_info), nullptr, nullptr, nullptr, delegate); 124 std::move(request_info), nullptr, nullptr, nullptr, delegate);
125 } 125 }
126 126
127 // Helper function for fetching the body of a URL to a string. 127 // Helper function for fetching the body of a URL to a string.
128 std::string FetchURL(const GURL& url) { 128 std::string FetchURL(const GURL& url) {
129 net::TestDelegate delegate; 129 net::TestDelegate delegate;
130 net::URLRequestContext* request_context = 130 net::URLRequestContext* request_context =
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 337
338 // Release the body. 338 // Release the body.
339 delegate.ReleaseBody(); 339 delegate.ReleaseBody();
340 base::RunLoop().RunUntilIdle(); 340 base::RunLoop().RunUntilIdle();
341 341
342 // Verify that URLRequestTestJob no longer has anything paused. 342 // Verify that URLRequestTestJob no longer has anything paused.
343 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); 343 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage());
344 } 344 }
345 345
346 } // namespace content 346 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698