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

Unified Diff: chrome/browser/sessions/session_types_unittest.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to the top of page_state.h Created 7 years, 7 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
Index: chrome/browser/sessions/session_types_unittest.cc
diff --git a/chrome/browser/sessions/session_types_unittest.cc b/chrome/browser/sessions/session_types_unittest.cc
index a1f786f3a8fb8c16cfe1e5e4018cc45864a5d9c4..3dd45109840a634f238f8dc214277a266db65f8b 100644
--- a/chrome/browser/sessions/session_types_unittest.cc
+++ b/chrome/browser/sessions/session_types_unittest.cc
@@ -34,7 +34,8 @@ const content::Referrer kReferrer =
WebKit::WebReferrerPolicyAlways);
const GURL kVirtualURL("http://www.virtual-url.com");
const string16 kTitle = ASCIIToUTF16("title");
-const std::string kContentState = "content state";
+const content::PageState kPageState =
+ content::PageState::CreateFromEncodedData("page state");
const content::PageTransition kTransitionType =
static_cast<content::PageTransition>(
content::PAGE_TRANSITION_AUTO_SUBFRAME |
@@ -57,7 +58,7 @@ scoped_ptr<content::NavigationEntry> MakeNavigationEntryForTest() {
navigation_entry->SetReferrer(kReferrer);
navigation_entry->SetVirtualURL(kVirtualURL);
navigation_entry->SetTitle(kTitle);
- navigation_entry->SetContentState(kContentState);
+ navigation_entry->SetPageState(kPageState);
navigation_entry->SetTransitionType(kTransitionType);
navigation_entry->SetHasPostData(kHasPostData);
navigation_entry->SetPostID(kPostID);
@@ -76,7 +77,7 @@ sync_pb::TabNavigation MakeSyncDataForTest() {
sync_data.set_virtual_url(kVirtualURL.spec());
sync_data.set_referrer(kReferrer.url.spec());
sync_data.set_title(UTF16ToUTF8(kTitle));
- sync_data.set_state(kContentState);
+ sync_data.set_state(kPageState.ToEncodedData());
sync_data.set_page_transition(
sync_pb::SyncEnums_PageTransition_AUTO_SUBFRAME);
sync_data.set_unique_id(kUniqueID);

Powered by Google App Engine
This is Rietveld 408576698