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

Unified Diff: content/public/common/page_state.cc

Issue 2309583002: Fix for the NavigationControllerTest.BackSubframe test failures with PlzNavigate (Closed)
Patch Set: Set document_sequence_number correctly and use the same strategy like Blink to generate these numbe… Created 4 years, 3 months 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/public/common/page_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/page_state.cc
diff --git a/content/public/common/page_state.cc b/content/public/common/page_state.cc
index 01cbedbedb7a394d39a81aa9d5b06f832c593259..7f9dfddfd0fd3148f14837aec80a28ebfcb34f35 100644
--- a/content/public/common/page_state.cc
+++ b/content/public/common/page_state.cc
@@ -105,6 +105,21 @@ PageState PageState::CreateForTesting(
return ToPageState(state);
}
+// static
+PageState PageState::CreateForTestingWithSequenceNumbers(
+ const GURL& url,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number) {
+ ExplodedPageState page_state;
+ page_state.top.url_string = ToNullableString16(url.spec());
+ page_state.top.item_sequence_number = item_sequence_number;
+ page_state.top.document_sequence_number = document_sequence_number;
+
+ std::string encoded_page_state;
+ EncodePageState(page_state, &encoded_page_state);
+ return CreateFromEncodedData(encoded_page_state);
+}
+
PageState::PageState() {
}
« no previous file with comments | « content/public/common/page_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698