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

Unified Diff: components/sessions/core/serialized_navigation_entry_unittest.cc

Issue 2310363002: Persist offline page info in a navigation entry if needed (Closed)
Patch Set: Add extended info support 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
Index: components/sessions/core/serialized_navigation_entry_unittest.cc
diff --git a/components/sessions/core/serialized_navigation_entry_unittest.cc b/components/sessions/core/serialized_navigation_entry_unittest.cc
index f0060eee0ae15bf5901cd5baf924d809cf2f0954..9afd32ba933000c71582cbd4c489e3d4060c7eac 100644
--- a/components/sessions/core/serialized_navigation_entry_unittest.cc
+++ b/components/sessions/core/serialized_navigation_entry_unittest.cc
@@ -132,6 +132,16 @@ TEST(SerializedNavigationEntryTest, Pickle) {
EXPECT_EQ(test_data::kSearchTerms, new_navigation.search_terms());
EXPECT_EQ(test_data::kHttpStatusCode, new_navigation.http_status_code());
+ ASSERT_EQ(2U, new_navigation.extended_info_map().size());
+ ASSERT_EQ(1U,
+ new_navigation.extended_info_map().count(test_data::kExtendedInfoKey1));
+ EXPECT_EQ(test_data::kExtendedInfoValue1,
+ new_navigation.extended_info_map().at(test_data::kExtendedInfoKey1));
+ ASSERT_EQ(1U,
+ new_navigation.extended_info_map().count(test_data::kExtendedInfoKey2));
+ EXPECT_EQ(test_data::kExtendedInfoValue2,
+ new_navigation.extended_info_map().at(test_data::kExtendedInfoKey2));
+
// Fields that are not written to the pickle.
EXPECT_EQ(0, new_navigation.unique_id());
EXPECT_EQ(std::string(), new_navigation.encoded_page_state());

Powered by Google App Engine
This is Rietveld 408576698