Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: content/public/test/render_view_test.cc

Issue 1427633004: Send navigation_start to the browser in DidStartProvisionalLoad IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation_start_renderer
Patch Set: Write GoToOffsetWithParams to use GoToOffset (DRY) Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index c13f6699fd106e6c150ee79d89f1360b2d3b4062..d356527987b557b9cd918c3663bfcfbeeeee9e78 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -578,18 +578,24 @@ scoped_ptr<ViewMsg_Resize_Params> RenderViewTest::InitialSizeParams() {
}
void RenderViewTest::GoToOffset(int offset, const PageState& state) {
+ CommonNavigationParams common_params;
+ common_params.transition = ui::PAGE_TRANSITION_FORWARD_BACK;
+ GoToOffsetWithParams(offset, state, common_params, StartNavigationParams(),
+ RequestNavigationParams());
+}
+
+void RenderViewTest::GoToOffsetWithParams(
+ int offset,
+ const PageState& state,
+ const CommonNavigationParams common_params,
+ const StartNavigationParams start_params,
+ RequestNavigationParams request_params) {
RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
int history_list_length = impl->historyBackListCount() +
impl->historyForwardListCount() + 1;
int pending_offset = offset + impl->history_list_offset_;
- CommonNavigationParams common_params(
- GURL(), Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK,
- FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(),
- FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(),
- LOFI_UNSPECIFIED, base::TimeTicks::Now());
- RequestNavigationParams request_params;
request_params.page_state = state;
request_params.page_id = impl->page_id_ + offset;
request_params.nav_entry_id = pending_offset + 1;
@@ -599,7 +605,7 @@ void RenderViewTest::GoToOffset(int offset, const PageState& state) {
TestRenderFrame* frame =
static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
- frame->Navigate(common_params, StartNavigationParams(), request_params);
+ frame->Navigate(common_params, start_params, request_params);
// The load actually happens asynchronously, so we pump messages to process
// the pending continuation.

Powered by Google App Engine
This is Rietveld 408576698