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

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

Issue 2338703003: [NTP] Fix article suggestion clicks contributing to Most Visited tiles (Closed)
Patch Set: Add test coverage to HistoryBackend. 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..a1906367d6f0744308d7cd97eb9f8160ab508b14 100644
--- a/components/sessions/core/serialized_navigation_entry_unittest.cc
+++ b/components/sessions/core/serialized_navigation_entry_unittest.cc
@@ -167,6 +167,7 @@ TEST(SerializedNavigationEntryTest, ToSyncData) {
EXPECT_EQ(test_data::kRedirectURL1.spec(),
sync_data.navigation_redirect(1).url());
EXPECT_FALSE(sync_data.has_last_navigation_redirect_url());
+ EXPECT_FALSE(sync_data.has_navigation_ignore_for_ntp_tiles());
}
// Test that the last_navigation_redirect_url is set when needed. This test is
@@ -225,5 +226,16 @@ TEST(SerializedNavigationEntryTest, TransitionTypes) {
}
}
+TEST(SerializedNavigationEntryTest, IgnoreForNtpTiles) {
+ SerializedNavigationEntry navigation =
+ SerializedNavigationEntryTestHelper::CreateNavigationForTest();
+ SerializedNavigationEntryTestHelper::SetTransitionType(
+ ui::PageTransitionFromInt(ui::PAGE_TRANSITION_AUTO_BOOKMARK |
+ ui::PAGE_TRANSITION_IGNORE_FOR_NTP_TILES),
+ &navigation);
+ const sync_pb::TabNavigation sync_data = navigation.ToSyncData();
+ EXPECT_TRUE(sync_data.navigation_ignore_for_ntp_tiles());
+}
+
} // namespace
} // namespace sessions
« no previous file with comments | « components/sessions/core/serialized_navigation_entry.cc ('k') | components/sync/protocol/session_specifics.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698