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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 TestNavigationURLLoaderDelegate delegate; 1062 TestNavigationURLLoaderDelegate delegate;
1063 BeginNavigationParams begin_params( 1063 BeginNavigationParams begin_params(
1064 std::string(), net::LOAD_NORMAL, false, false, 1064 std::string(), net::LOAD_NORMAL, false, false,
1065 REQUEST_CONTEXT_TYPE_LOCATION, 1065 REQUEST_CONTEXT_TYPE_LOCATION,
1066 blink::WebMixedContentContextType::kBlockable, 1066 blink::WebMixedContentContextType::kBlockable,
1067 false, // is_form_submission 1067 false, // is_form_submission
1068 url::Origin(url)); 1068 url::Origin(url));
1069 CommonNavigationParams common_params; 1069 CommonNavigationParams common_params;
1070 common_params.url = url; 1070 common_params.url = url;
1071 std::unique_ptr<NavigationRequestInfo> request_info( 1071 std::unique_ptr<NavigationRequestInfo> request_info(
1072 new NavigationRequestInfo(common_params, begin_params, url, true, 1072 new NavigationRequestInfo(
1073 false, false, -1, false, false, 1073 common_params, begin_params, url, true, false, false, -1, false,
1074 blink::kWebPageVisibilityStateVisible)); 1074 false, blink::kWebPageVisibilityStateVisible, "", 0));
1075 std::unique_ptr<NavigationURLLoader> test_loader = 1075 std::unique_ptr<NavigationURLLoader> test_loader =
1076 NavigationURLLoader::Create( 1076 NavigationURLLoader::Create(
1077 browser_context_->GetResourceContext(), 1077 browser_context_->GetResourceContext(),
1078 BrowserContext::GetDefaultStoragePartition( 1078 BrowserContext::GetDefaultStoragePartition(
1079 browser_context_.get()), 1079 browser_context_.get()),
1080 std::move(request_info), nullptr, nullptr, nullptr, &delegate); 1080 std::move(request_info), nullptr, nullptr, nullptr, &delegate);
1081 1081
1082 // The navigation should fail with the expected error code. 1082 // The navigation should fail with the expected error code.
1083 delegate.WaitForRequestFailed(); 1083 delegate.WaitForRequestFailed();
1084 ASSERT_EQ(expected_error_code, delegate.net_error()); 1084 ASSERT_EQ(expected_error_code, delegate.net_error());
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 TestNavigationURLLoaderDelegate delegate; 2580 TestNavigationURLLoaderDelegate delegate;
2581 BeginNavigationParams begin_params( 2581 BeginNavigationParams begin_params(
2582 std::string(), net::LOAD_NORMAL, false, false, 2582 std::string(), net::LOAD_NORMAL, false, false,
2583 REQUEST_CONTEXT_TYPE_LOCATION, 2583 REQUEST_CONTEXT_TYPE_LOCATION,
2584 blink::WebMixedContentContextType::kBlockable, 2584 blink::WebMixedContentContextType::kBlockable,
2585 false, // is_form_submission 2585 false, // is_form_submission
2586 url::Origin(download_url)); 2586 url::Origin(download_url));
2587 CommonNavigationParams common_params; 2587 CommonNavigationParams common_params;
2588 common_params.url = download_url; 2588 common_params.url = download_url;
2589 std::unique_ptr<NavigationRequestInfo> request_info( 2589 std::unique_ptr<NavigationRequestInfo> request_info(
2590 new NavigationRequestInfo(common_params, begin_params, download_url, 2590 new NavigationRequestInfo(
2591 true, false, false, -1, false, false, 2591 common_params, begin_params, download_url, true, false, false, -1,
2592 blink::kWebPageVisibilityStateVisible)); 2592 false, false, blink::kWebPageVisibilityStateVisible, "", 0));
2593 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create( 2593 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create(
2594 browser_context_->GetResourceContext(), 2594 browser_context_->GetResourceContext(),
2595 BrowserContext::GetDefaultStoragePartition(browser_context_.get()), 2595 BrowserContext::GetDefaultStoragePartition(browser_context_.get()),
2596 std::move(request_info), nullptr, nullptr, nullptr, &delegate); 2596 std::move(request_info), nullptr, nullptr, nullptr, &delegate);
2597 2597
2598 // Wait until a response has been received and proceed with the response. 2598 // Wait until a response has been received and proceed with the response.
2599 KickOffRequest(); 2599 KickOffRequest();
2600 2600
2601 // Return some data so that the request is identified as a download 2601 // Return some data so that the request is identified as a download
2602 // and the proper resource handlers are created. 2602 // and the proper resource handlers are created.
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3926 return nullptr; 3926 return nullptr;
3927 } 3927 }
3928 3928
3929 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( 3929 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse(
3930 net::URLRequest* request, 3930 net::URLRequest* request,
3931 net::NetworkDelegate* network_delegate) const { 3931 net::NetworkDelegate* network_delegate) const {
3932 return nullptr; 3932 return nullptr;
3933 } 3933 }
3934 3934
3935 } // namespace content 3935 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698