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

Unified Diff: components/ntp_tiles/most_visited_sites_unittest.cc

Issue 2584853002: ntp_tiles: Fix Top Sites potentially overriding Suggestions Service (Closed)
Patch Set: Rebased. Created 3 years, 11 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 | « components/ntp_tiles/most_visited_sites.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/most_visited_sites_unittest.cc
diff --git a/components/ntp_tiles/most_visited_sites_unittest.cc b/components/ntp_tiles/most_visited_sites_unittest.cc
index bc7f877a2a8137c8dac90eb3e786ca09afb9868b..4273aee782520e4b9ce0b9ab6b2cf4656ce2b19a 100644
--- a/components/ntp_tiles/most_visited_sites_unittest.cc
+++ b/components/ntp_tiles/most_visited_sites_unittest.cc
@@ -351,9 +351,8 @@ TEST_F(MostVisitedSitesWithEmptyCacheTest,
// Constructor sets basic expectations for a suggestions service cache miss.
}
-// TODO(mastiz): This describes the current behavior but it actually is a bug.
TEST_F(MostVisitedSitesWithEmptyCacheTest,
- DoesNotIgnoreTopSitesIfSuggestionsServiceFaster) {
+ ShouldIgnoreTopSitesIfSuggestionsServiceFaster) {
// Reply from suggestions service triggers and update to our observer.
EXPECT_CALL(
mock_observer_,
@@ -363,11 +362,7 @@ TEST_F(MostVisitedSitesWithEmptyCacheTest,
MakeProfile({MakeSuggestion("Site 1", "http://site1/")}));
VerifyAndClearExpectations();
- // Reply from top sites is currently not ignored (i.e. is actually reported to
- // observer).
- EXPECT_CALL(mock_observer_,
- OnMostVisitedURLsAvailable(ElementsAre(MatchesTile(
- "Site 2", "http://site2/", NTPTileSource::TOP_SITES))));
+ // Reply from top sites is ignored (i.e. not reported to observer).
top_sites_callbacks_.ClearAndNotify(
{MakeMostVisitedURL("Site 2", "http://site2/")});
base::RunLoop().RunUntilIdle();
« no previous file with comments | « components/ntp_tiles/most_visited_sites.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698