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

Unified Diff: components/ntp_tiles/popular_sites_impl_unittest.cc

Issue 2841643005: [Popular Sites] Add Variations parameter to override URL path (Closed)
Patch Set: Update ntp-tiles-internals. Created 3 years, 8 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/popular_sites_impl.cc ('k') | components/ntp_tiles/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/popular_sites_impl_unittest.cc
diff --git a/components/ntp_tiles/popular_sites_impl_unittest.cc b/components/ntp_tiles/popular_sites_impl_unittest.cc
index 1deff6bd575927161c6b359c202d504d7595a3c4..044a5d6d3ae72bd3088b71f77e0df6c261a382de 100644
--- a/components/ntp_tiles/popular_sites_impl_unittest.cc
+++ b/components/ntp_tiles/popular_sites_impl_unittest.cc
@@ -458,5 +458,18 @@ TEST_F(PopularSitesTest, RefetchesAfterFallback) {
EXPECT_THAT(sites[0].url, URLEq("https://www.chromium.org/"));
}
+TEST_F(PopularSitesTest, ShouldOverrideDirectory) {
+ SetCountryAndVersion("ZZ", "9");
+ prefs_->SetString(prefs::kPopularSitesOverrideDirectory, "foo/bar/");
+ RespondWithJSON("https://www.gstatic.com/foo/bar/suggested_sites_ZZ_9.json",
+ {kWikipedia});
+
+ PopularSites::SitesVector sites;
+ EXPECT_THAT(FetchPopularSites(/*force_download=*/false, &sites),
+ Eq(base::Optional<bool>(true)));
+
+ EXPECT_THAT(sites.size(), Eq(1u));
+}
+
} // namespace
} // namespace ntp_tiles
« no previous file with comments | « components/ntp_tiles/popular_sites_impl.cc ('k') | components/ntp_tiles/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698