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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, | 427 blink::WebMixedContentContextType::Blockable, |
428 false, // is_form_submission | 428 false, // is_form_submission |
429 url::Origin()); | 429 url::Origin(), 0 /* renderer_navigation_id */); |
430 CommonNavigationParams common_params; | 430 CommonNavigationParams common_params; |
431 common_params.url = url; | 431 common_params.url = url; |
432 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); | 432 common_params.referrer = Referrer(GURL(), blink::WebReferrerPolicyDefault); |
433 common_params.transition = ui::PAGE_TRANSITION_LINK; | 433 common_params.transition = ui::PAGE_TRANSITION_LINK; |
434 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; | 434 common_params.navigation_type = FrameMsg_Navigate_Type::DIFFERENT_DOCUMENT; |
435 OnBeginNavigation(common_params, begin_params); | 435 OnBeginNavigation(common_params, begin_params); |
436 } | 436 } |
437 } | 437 } |
438 | 438 |
439 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... |
520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at | 520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at |
521 // this point. | 521 // this point. |
522 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) | 522 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) |
523 return; | 523 return; |
524 navigation_handle()->CallWillStartRequestForTesting( | 524 navigation_handle()->CallWillStartRequestForTesting( |
525 false /* is_post */, Referrer(GURL(), blink::WebReferrerPolicyDefault), | 525 false /* is_post */, Referrer(GURL(), blink::WebReferrerPolicyDefault), |
526 true /* user_gesture */, transition, false /* is_external_protocol */); | 526 true /* user_gesture */, transition, false /* is_external_protocol */); |
527 } | 527 } |
528 | 528 |
529 } // namespace content | 529 } // namespace content |
OLD | NEW |