OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cctype> | 9 #include <cctype> |
10 | 10 |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 const GURL& url, | 645 const GURL& url, |
646 const PageState& state) { | 646 const PageState& state) { |
647 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 647 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
648 | 648 |
649 int history_list_length = impl->historyBackListCount() + | 649 int history_list_length = impl->historyBackListCount() + |
650 impl->historyForwardListCount() + 1; | 650 impl->historyForwardListCount() + 1; |
651 int pending_offset = offset + impl->history_list_offset_; | 651 int pending_offset = offset + impl->history_list_offset_; |
652 | 652 |
653 CommonNavigationParams common_params( | 653 CommonNavigationParams common_params( |
654 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, | 654 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, |
655 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(), | 655 FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT, true, false, |
656 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), | 656 base::TimeTicks(), FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), |
657 PREVIEWS_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); | 657 GURL(), PREVIEWS_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); |
658 RequestNavigationParams request_params; | 658 RequestNavigationParams request_params; |
659 request_params.page_state = state; | 659 request_params.page_state = state; |
660 request_params.nav_entry_id = pending_offset + 1; | 660 request_params.nav_entry_id = pending_offset + 1; |
661 request_params.pending_history_list_offset = pending_offset; | 661 request_params.pending_history_list_offset = pending_offset; |
662 request_params.current_history_list_offset = impl->history_list_offset_; | 662 request_params.current_history_list_offset = impl->history_list_offset_; |
663 request_params.current_history_list_length = history_list_length; | 663 request_params.current_history_list_length = history_list_length; |
664 | 664 |
665 TestRenderFrame* frame = | 665 TestRenderFrame* frame = |
666 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 666 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
667 frame->Navigate(common_params, StartNavigationParams(), request_params); | 667 frame->Navigate(common_params, StartNavigationParams(), request_params); |
668 | 668 |
669 // The load actually happens asynchronously, so we pump messages to process | 669 // The load actually happens asynchronously, so we pump messages to process |
670 // the pending continuation. | 670 // the pending continuation. |
671 FrameLoadWaiter(frame).Wait(); | 671 FrameLoadWaiter(frame).Wait(); |
672 view_->GetWebView()->updateAllLifecyclePhases(); | 672 view_->GetWebView()->updateAllLifecyclePhases(); |
673 } | 673 } |
674 | 674 |
675 } // namespace content | 675 } // namespace content |
OLD | NEW |