| OLD | NEW |
| 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 void CompleteFailingMainResourceRequest(const GURL& url, | 1075 void CompleteFailingMainResourceRequest(const GURL& url, |
| 1076 int expected_error_code) { | 1076 int expected_error_code) { |
| 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, url::Origin(url)); | 1085 blink::WebMixedContentContextType::Blockable, |
| 1086 false, // is_form_submission |
| 1087 url::Origin(url)); |
| 1086 CommonNavigationParams common_params; | 1088 CommonNavigationParams common_params; |
| 1087 common_params.url = url; | 1089 common_params.url = url; |
| 1088 std::unique_ptr<NavigationRequestInfo> request_info( | 1090 std::unique_ptr<NavigationRequestInfo> request_info( |
| 1089 new NavigationRequestInfo(common_params, begin_params, url, true, | 1091 new NavigationRequestInfo(common_params, begin_params, url, true, |
| 1090 false, false, -1, false, false, | 1092 false, false, -1, false, false, |
| 1091 blink::WebPageVisibilityStateVisible)); | 1093 blink::WebPageVisibilityStateVisible)); |
| 1092 std::unique_ptr<NavigationURLLoader> test_loader = | 1094 std::unique_ptr<NavigationURLLoader> test_loader = |
| 1093 NavigationURLLoader::Create(browser_context_.get(), | 1095 NavigationURLLoader::Create(browser_context_.get(), |
| 1094 std::move(request_info), nullptr, nullptr, | 1096 std::move(request_info), nullptr, nullptr, |
| 1095 nullptr, &delegate); | 1097 nullptr, &delegate); |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2636 | 2638 |
| 2637 const GURL download_url = GURL("http://example.com/blah"); | 2639 const GURL download_url = GURL("http://example.com/blah"); |
| 2638 | 2640 |
| 2639 if (IsBrowserSideNavigationEnabled()) { | 2641 if (IsBrowserSideNavigationEnabled()) { |
| 2640 // Create a NavigationRequest. | 2642 // Create a NavigationRequest. |
| 2641 TestNavigationURLLoaderDelegate delegate; | 2643 TestNavigationURLLoaderDelegate delegate; |
| 2642 BeginNavigationParams begin_params( | 2644 BeginNavigationParams begin_params( |
| 2643 std::string(), net::LOAD_NORMAL, false, false, | 2645 std::string(), net::LOAD_NORMAL, false, false, |
| 2644 REQUEST_CONTEXT_TYPE_LOCATION, | 2646 REQUEST_CONTEXT_TYPE_LOCATION, |
| 2645 blink::WebMixedContentContextType::Blockable, | 2647 blink::WebMixedContentContextType::Blockable, |
| 2648 false, // is_form_submission |
| 2646 url::Origin(download_url)); | 2649 url::Origin(download_url)); |
| 2647 CommonNavigationParams common_params; | 2650 CommonNavigationParams common_params; |
| 2648 common_params.url = download_url; | 2651 common_params.url = download_url; |
| 2649 std::unique_ptr<NavigationRequestInfo> request_info( | 2652 std::unique_ptr<NavigationRequestInfo> request_info( |
| 2650 new NavigationRequestInfo(common_params, begin_params, download_url, | 2653 new NavigationRequestInfo(common_params, begin_params, download_url, |
| 2651 true, false, false, -1, false, false, | 2654 true, false, false, -1, false, false, |
| 2652 blink::WebPageVisibilityStateVisible)); | 2655 blink::WebPageVisibilityStateVisible)); |
| 2653 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create( | 2656 std::unique_ptr<NavigationURLLoader> loader = NavigationURLLoader::Create( |
| 2654 browser_context_.get(), std::move(request_info), nullptr, nullptr, | 2657 browser_context_.get(), std::move(request_info), nullptr, nullptr, |
| 2655 nullptr, &delegate); | 2658 nullptr, &delegate); |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3991 return nullptr; | 3994 return nullptr; |
| 3992 } | 3995 } |
| 3993 | 3996 |
| 3994 INSTANTIATE_TEST_CASE_P( | 3997 INSTANTIATE_TEST_CASE_P( |
| 3995 ResourceDispatcherHostTests, | 3998 ResourceDispatcherHostTests, |
| 3996 ResourceDispatcherHostTest, | 3999 ResourceDispatcherHostTest, |
| 3997 testing::Values(TestConfig::kDefault, | 4000 testing::Values(TestConfig::kDefault, |
| 3998 TestConfig::kOptimizeIPCForSmallResourceEnabled)); | 4001 TestConfig::kOptimizeIPCForSmallResourceEnabled)); |
| 3999 | 4002 |
| 4000 } // namespace content | 4003 } // namespace content |
| OLD | NEW |