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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 if (!IsBrowserSideNavigationEnabled() || | 504 if (!IsBrowserSideNavigationEnabled() || |
505 frame_tree_node()->navigation_request()) { | 505 frame_tree_node()->navigation_request()) { |
506 PrepareForCommit(); | 506 PrepareForCommit(); |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 WebBluetoothServiceImpl* | 510 WebBluetoothServiceImpl* |
511 TestRenderFrameHost::CreateWebBluetoothServiceForTesting() { | 511 TestRenderFrameHost::CreateWebBluetoothServiceForTesting() { |
512 WebBluetoothServiceImpl* service = | 512 WebBluetoothServiceImpl* service = |
513 RenderFrameHostImpl::CreateWebBluetoothService( | 513 RenderFrameHostImpl::CreateWebBluetoothService( |
| 514 service_manager::BindSourceInfo(), |
514 blink::mojom::WebBluetoothServiceRequest()); | 515 blink::mojom::WebBluetoothServiceRequest()); |
515 return service; | 516 return service; |
516 } | 517 } |
517 | 518 |
518 void TestRenderFrameHost::SimulateWillStartRequest( | 519 void TestRenderFrameHost::SimulateWillStartRequest( |
519 ui::PageTransition transition) { | 520 ui::PageTransition transition) { |
520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at | 521 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at |
521 // this point. | 522 // this point. |
522 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) | 523 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) |
523 return; | 524 return; |
524 navigation_handle()->CallWillStartRequestForTesting( | 525 navigation_handle()->CallWillStartRequestForTesting( |
525 false /* is_post */, Referrer(GURL(), blink::kWebReferrerPolicyDefault), | 526 false /* is_post */, Referrer(GURL(), blink::kWebReferrerPolicyDefault), |
526 true /* user_gesture */, transition, false /* is_external_protocol */); | 527 true /* user_gesture */, transition, false /* is_external_protocol */); |
527 } | 528 } |
528 | 529 |
529 } // namespace content | 530 } // namespace content |
OLD | NEW |