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

Unified Diff: components/ntp_tiles/popular_sites_impl_unittest.cc

Issue 2695713004: Add baked-in favicons for default popular sites on NTP (Closed)
Patch Set: Controle image size in tests and refine download script Created 3 years, 10 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/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 6732e27cc0cca77c40ede17e986c36bc0622432b..1e80a63b406266fb05c7a5e77ad173ba62b1164e 100644
--- a/components/ntp_tiles/popular_sites_impl_unittest.cc
+++ b/components/ntp_tiles/popular_sites_impl_unittest.cc
@@ -234,6 +234,18 @@ TEST_F(PopularSitesTest, PopulatesWithDefaultResoucesOnFailure) {
EXPECT_THAT(sites.size(), Eq(GetNumberOfDefaultPopularSitesForPlatform()));
}
+TEST_F(PopularSitesTest, AddsIconResourcesToDefaultPages) {
+ scoped_refptr<net::TestURLRequestContextGetter> url_request_context(
+ new net::TestURLRequestContextGetter(
+ base::ThreadTaskRunnerHandle::Get()));
+ std::unique_ptr<PopularSites> popular_sites =
+ CreatePopularSites(url_request_context.get());
+
+ for (const auto& site : popular_sites->sites()) {
+ EXPECT_TRUE(site.default_resource_id > 0);
+ }
+}
+
TEST_F(PopularSitesTest, ProvidesDefaultSitesUntilCallbackReturns) {
SetCountryAndVersion("ZZ", "9");
RespondWithJSON(
« no previous file with comments | « components/ntp_tiles/popular_sites_impl.cc ('k') | components/ntp_tiles/resources/default_popular_sites.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698