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

Unified Diff: content/test/test_render_frame_host.cc

Issue 2477623002: Don't fire onbeforeunload for same document history navigations with PlzNavigate. (Closed)
Patch Set: review comment Created 4 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_render_frame_host.cc
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index c7d0d6f4bca4d3bf1935e3a48be416d0fa7b2a34..2c98841e74c1d30e285e40394f166a4a6c659059 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -325,8 +325,10 @@ void TestRenderFrameHost::SendNavigateWithParameters(
params.history_list_was_cleared = simulate_history_list_was_cleared_;
params.original_request_url = url_copy;
- // Simulate Blink assigning an item sequence number to the navigation.
+ // Simulate Blink assigning an item and document sequence number to the
+ // navigation.
params.item_sequence_number = base::Time::Now().ToDoubleT() * 1000000;
+ params.document_sequence_number = params.item_sequence_number + 1;
// When the user hits enter in the Omnibox without changing the URL, Blink
// behaves similarly to a reload and does not change the item and document
@@ -368,7 +370,9 @@ void TestRenderFrameHost::SendNavigateWithParameters(
GetLastCommittedURL().ReplaceComponents(replacements));
params.page_state =
- PageState::CreateForTesting(url_copy, false, nullptr, nullptr);
+ PageState::CreateForTestingWithSequenceNumbers(
+ url_copy, params.item_sequence_number,
+ params.document_sequence_number);
if (!callback.is_null())
callback.Run(&params);
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698