| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/test/test_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/browser/frame_host/frame_tree.h" | 9 #include "content/browser/frame_host/frame_tree.h" |
| 10 #include "content/browser/frame_host/navigation_handle_impl.h" | 10 #include "content/browser/frame_host/navigation_handle_impl.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 bool has_user_gesture) { | 417 bool has_user_gesture) { |
| 418 // Since this is renderer-initiated navigation, the RenderFrame must be | 418 // Since this is renderer-initiated navigation, the RenderFrame must be |
| 419 // initialized. Do it if it hasn't happened yet. | 419 // initialized. Do it if it hasn't happened yet. |
| 420 InitializeRenderFrameIfNeeded(); | 420 InitializeRenderFrameIfNeeded(); |
| 421 | 421 |
| 422 if (IsBrowserSideNavigationEnabled()) { | 422 if (IsBrowserSideNavigationEnabled()) { |
| 423 // TODO(mkwst): The initiator origin here is incorrect. | 423 // TODO(mkwst): The initiator origin here is incorrect. |
| 424 BeginNavigationParams begin_params( | 424 BeginNavigationParams begin_params( |
| 425 std::string(), net::LOAD_NORMAL, has_user_gesture, false, | 425 std::string(), net::LOAD_NORMAL, has_user_gesture, false, |
| 426 REQUEST_CONTEXT_TYPE_HYPERLINK, | 426 REQUEST_CONTEXT_TYPE_HYPERLINK, |
| 427 blink::WebMixedContentContextType::Blockable, url::Origin()); | 427 blink::WebMixedContentContextType::Blockable, |
| 428 false, // is_form_submission |
| 429 url::Origin()); |
| 428 CommonNavigationParams common_params; | 430 CommonNavigationParams common_params; |
| 429 common_params.url = url; | 431 common_params.url = url; |
| 430 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); | 432 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); |
| 431 common_params.transition = ui::PAGE_TRANSITION_LINK; | 433 common_params.transition = ui::PAGE_TRANSITION_LINK; |
| 432 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; | 434 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; |
| 433 OnBeginNavigation(common_params, begin_params); | 435 OnBeginNavigation(common_params, begin_params); |
| 434 } | 436 } |
| 435 } | 437 } |
| 436 | 438 |
| 437 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { | 439 void TestRenderFrameHost::DidChangeOpener(int opener_routing_id) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at | 520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at |
| 519 // this point. | 521 // this point. |
| 520 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) | 522 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) |
| 521 return; | 523 return; |
| 522 navigation_handle()->CallWillStartRequestForTesting( | 524 navigation_handle()->CallWillStartRequestForTesting( |
| 523 false /* is_post */, Referrer(GURL(), blink::WebReferrerPolicyDefault), | 525 false /* is_post */, Referrer(GURL(), blink::WebReferrerPolicyDefault), |
| 524 true /* user_gesture */, transition, false /* is_external_protocol */); | 526 true /* user_gesture */, transition, false /* is_external_protocol */); |
| 525 } | 527 } |
| 526 | 528 |
| 527 } // namespace content | 529 } // namespace content |
| OLD | NEW |