OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/public/test/navigation_simulator.h" | 5 #include "content/public/test/navigation_simulator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "content/browser/frame_host/navigation_handle_impl.h" | 10 #include "content/browser/frame_host/navigation_handle_impl.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 throttle_checks_wait_closure_.Run(); | 544 throttle_checks_wait_closure_.Run(); |
545 } | 545 } |
546 | 546 |
547 void NavigationSimulator::PrepareCompleteCallbackOnHandle() { | 547 void NavigationSimulator::PrepareCompleteCallbackOnHandle() { |
548 last_throttle_check_result_.reset(); | 548 last_throttle_check_result_.reset(); |
549 handle_->set_complete_callback_for_testing( | 549 handle_->set_complete_callback_for_testing( |
550 base::Bind(&NavigationSimulator::OnThrottleChecksComplete, | 550 base::Bind(&NavigationSimulator::OnThrottleChecksComplete, |
551 weak_factory_.GetWeakPtr())); | 551 weak_factory_.GetWeakPtr())); |
552 } | 552 } |
553 | 553 |
| 554 RenderFrameHost* NavigationSimulator::GetFinalRenderFrameHost() { |
| 555 CHECK_EQ(state_, FINISHED); |
| 556 return render_frame_host_; |
| 557 } |
| 558 |
554 } // namespace content | 559 } // namespace content |
OLD | NEW |