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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 const GURL& url, | 652 const GURL& url, |
653 const PageState& state) { | 653 const PageState& state) { |
654 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 654 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
655 | 655 |
656 int history_list_length = impl->historyBackListCount() + | 656 int history_list_length = impl->historyBackListCount() + |
657 impl->historyForwardListCount() + 1; | 657 impl->historyForwardListCount() + 1; |
658 int pending_offset = offset + impl->history_list_offset_; | 658 int pending_offset = offset + impl->history_list_offset_; |
659 | 659 |
660 CommonNavigationParams common_params( | 660 CommonNavigationParams common_params( |
661 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, | 661 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, |
662 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(), | 662 FrameMsg_Navigate_Type::HISTORY_DIFFERENT_DOCUMENT, true, false, |
663 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), | 663 base::TimeTicks(), FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), |
664 PREVIEWS_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); | 664 GURL(), PREVIEWS_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr); |
665 RequestNavigationParams request_params; | 665 RequestNavigationParams request_params; |
666 request_params.page_state = state; | 666 request_params.page_state = state; |
667 request_params.nav_entry_id = pending_offset + 1; | 667 request_params.nav_entry_id = pending_offset + 1; |
668 request_params.pending_history_list_offset = pending_offset; | 668 request_params.pending_history_list_offset = pending_offset; |
669 request_params.current_history_list_offset = impl->history_list_offset_; | 669 request_params.current_history_list_offset = impl->history_list_offset_; |
670 request_params.current_history_list_length = history_list_length; | 670 request_params.current_history_list_length = history_list_length; |
671 | 671 |
672 TestRenderFrame* frame = | 672 TestRenderFrame* frame = |
673 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 673 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
674 frame->Navigate(common_params, StartNavigationParams(), request_params); | 674 frame->Navigate(common_params, StartNavigationParams(), request_params); |
675 | 675 |
676 // The load actually happens asynchronously, so we pump messages to process | 676 // The load actually happens asynchronously, so we pump messages to process |
677 // the pending continuation. | 677 // the pending continuation. |
678 FrameLoadWaiter(frame).Wait(); | 678 FrameLoadWaiter(frame).Wait(); |
679 view_->GetWebView()->updateAllLifecyclePhases(); | 679 view_->GetWebView()->updateAllLifecyclePhases(); |
680 } | 680 } |
681 | 681 |
682 } // namespace content | 682 } // namespace content |
OLD | NEW |