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

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

Issue 2768813002: PlzNavigate: don't stop all loaders when renderer-initiated nav fails
Patch Set: Created 3 years, 9 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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 if (IsBrowserSideNavigationEnabled()) { 1077 if (IsBrowserSideNavigationEnabled()) {
1078 auto_advance_ = true; 1078 auto_advance_ = true;
1079 1079
1080 // Make a navigation request. 1080 // Make a navigation request.
1081 TestNavigationURLLoaderDelegate delegate; 1081 TestNavigationURLLoaderDelegate delegate;
1082 BeginNavigationParams begin_params( 1082 BeginNavigationParams begin_params(
1083 std::string(), net::LOAD_NORMAL, false, false, 1083 std::string(), net::LOAD_NORMAL, false, false,
1084 REQUEST_CONTEXT_TYPE_LOCATION, 1084 REQUEST_CONTEXT_TYPE_LOCATION,
1085 blink::WebMixedContentContextType::Blockable, 1085 blink::WebMixedContentContextType::Blockable,
1086 false, // is_form_submission 1086 false, // is_form_submission
1087 url::Origin(url)); 1087 url::Origin(url), kInvalidRenderNavigationId);
1088 CommonNavigationParams common_params; 1088 CommonNavigationParams common_params;
1089 common_params.url = url; 1089 common_params.url = url;
1090 std::unique_ptr<NavigationRequestInfo> request_info( 1090 std::unique_ptr<NavigationRequestInfo> request_info(
1091 new NavigationRequestInfo(common_params, begin_params, url, true, 1091 new NavigationRequestInfo(common_params, begin_params, url, true,
1092 false, false, -1, false, false, 1092 false, false, -1, false, false,
1093 blink::WebPageVisibilityStateVisible)); 1093 blink::WebPageVisibilityStateVisible));
1094 std::unique_ptr<NavigationURLLoader> test_loader = 1094 std::unique_ptr<NavigationURLLoader> test_loader =
1095 NavigationURLLoader::Create( 1095 NavigationURLLoader::Create(
1096 browser_context_->GetResourceContext(), 1096 browser_context_->GetResourceContext(),
1097 BrowserContext::GetDefaultStoragePartition( 1097 BrowserContext::GetDefaultStoragePartition(
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 const GURL download_url = GURL("http://example.com/blah"); 2640 const GURL download_url = GURL("http://example.com/blah");
2641 2641
2642 if (IsBrowserSideNavigationEnabled()) { 2642 if (IsBrowserSideNavigationEnabled()) {
2643 // Create a NavigationRequest. 2643 // Create a NavigationRequest.
2644 TestNavigationURLLoaderDelegate delegate; 2644 TestNavigationURLLoaderDelegate delegate;
2645 BeginNavigationParams begin_params( 2645 BeginNavigationParams begin_params(
2646 std::string(), net::LOAD_NORMAL, false, false, 2646 std::string(), net::LOAD_NORMAL, false, false,
2647 REQUEST_CONTEXT_TYPE_LOCATION, 2647 REQUEST_CONTEXT_TYPE_LOCATION,
2648 blink::WebMixedContentContextType::Blockable, 2648 blink::WebMixedContentContextType::Blockable,
2649 false, // is_form_submission 2649 false, // is_form_submission
2650 url::Origin(download_url)); 2650 url::Origin(download_url), kInvalidRenderNavigationId);
2651 CommonNavigationParams common_params; 2651 CommonNavigationParams common_params;
2652 common_params.url = download_url; 2652 common_params.url = download_url;
2653 std::unique_ptr<NavigationRequestInfo> request_info( 2653 std::unique_ptr<NavigationRequestInfo> request_info(
2654 new NavigationRequestInfo(common_params, begin_params, download_url, 2654 new NavigationRequestInfo(common_params, begin_params, download_url,
2655 true, false, false, -1, false, false, 2655 true, false, false, -1, false, false,
2656 blink::WebPageVisibilityStateVisible)); 2656 blink::WebPageVisibilityStateVisible));
2657 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create( 2657 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create(
2658 browser_context_->GetResourceContext(), 2658 browser_context_->GetResourceContext(),
2659 BrowserContext::GetDefaultStoragePartition(browser_context_.get()), 2659 BrowserContext::GetDefaultStoragePartition(browser_context_.get()),
2660 std::move(request_info), nullptr, nullptr, nullptr, &delegate); 2660 std::move(request_info), nullptr, nullptr, nullptr, &delegate);
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
3996 return nullptr; 3996 return nullptr;
3997 } 3997 }
3998 3998
3999 INSTANTIATE_TEST_CASE_P( 3999 INSTANTIATE_TEST_CASE_P(
4000 ResourceDispatcherHostTests, 4000 ResourceDispatcherHostTests,
4001 ResourceDispatcherHostTest, 4001 ResourceDispatcherHostTest,
4002 testing::Values(TestConfig::kDefault, 4002 testing::Values(TestConfig::kDefault,
4003 TestConfig::kOptimizeIPCForSmallResourceEnabled)); 4003 TestConfig::kOptimizeIPCForSmallResourceEnabled));
4004 4004
4005 } // namespace content 4005 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698