OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 102 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
103 switches::kEnableBrowserSideNavigation); | 103 switches::kEnableBrowserSideNavigation); |
104 } | 104 } |
105 | 105 |
106 std::unique_ptr<NavigationURLLoader> MakeTestLoader( | 106 std::unique_ptr<NavigationURLLoader> MakeTestLoader( |
107 const GURL& url, | 107 const GURL& url, |
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::Blockable, url::Origin(url)); | 112 blink::WebMixedContentContextType::Blockable, |
| 113 false, // is_form_submission |
| 114 url::Origin(url)); |
113 CommonNavigationParams common_params; | 115 CommonNavigationParams common_params; |
114 common_params.url = url; | 116 common_params.url = url; |
115 std::unique_ptr<NavigationRequestInfo> request_info( | 117 std::unique_ptr<NavigationRequestInfo> request_info( |
116 new NavigationRequestInfo(common_params, begin_params, url, true, false, | 118 new NavigationRequestInfo(common_params, begin_params, url, true, false, |
117 false, -1, false, false, | 119 false, -1, false, false, |
118 blink::WebPageVisibilityStateVisible)); | 120 blink::WebPageVisibilityStateVisible)); |
119 return NavigationURLLoader::Create( | 121 return NavigationURLLoader::Create( |
120 browser_context_->GetResourceContext(), | 122 browser_context_->GetResourceContext(), |
121 BrowserContext::GetDefaultStoragePartition(browser_context_.get()), | 123 BrowserContext::GetDefaultStoragePartition(browser_context_.get()), |
122 std::move(request_info), nullptr, nullptr, nullptr, delegate); | 124 std::move(request_info), nullptr, nullptr, nullptr, delegate); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 337 |
336 // Release the body. | 338 // Release the body. |
337 delegate.ReleaseBody(); | 339 delegate.ReleaseBody(); |
338 base::RunLoop().RunUntilIdle(); | 340 base::RunLoop().RunUntilIdle(); |
339 | 341 |
340 // Verify that URLRequestTestJob no longer has anything paused. | 342 // Verify that URLRequestTestJob no longer has anything paused. |
341 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); | 343 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); |
342 } | 344 } |
343 | 345 |
344 } // namespace content | 346 } // namespace content |
OLD | NEW |