OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/ntp_tiles/most_visited_sites.h" | 5 #include "components/ntp_tiles/most_visited_sites.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 public: | 188 public: |
189 MOCK_METHOD1(OnMostVisitedURLsAvailable, void(const NTPTilesVector& tiles)); | 189 MOCK_METHOD1(OnMostVisitedURLsAvailable, void(const NTPTilesVector& tiles)); |
190 MOCK_METHOD1(OnIconMadeAvailable, void(const GURL& site_url)); | 190 MOCK_METHOD1(OnIconMadeAvailable, void(const GURL& site_url)); |
191 }; | 191 }; |
192 | 192 |
193 class MockIconCacher : public IconCacher { | 193 class MockIconCacher : public IconCacher { |
194 public: | 194 public: |
195 MOCK_METHOD2(StartFetch, | 195 MOCK_METHOD2(StartFetch, |
196 void(PopularSites::Site site, | 196 void(PopularSites::Site site, |
197 const base::Callback<void(bool)>& done)); | 197 const base::Callback<void(bool)>& done)); |
| 198 MOCK_METHOD2(AddDefaultImage, |
| 199 void(const PopularSites::Site& site, int image_resource_id)); |
198 }; | 200 }; |
199 | 201 |
200 class PopularSitesFactoryForTest { | 202 class PopularSitesFactoryForTest { |
201 public: | 203 public: |
202 PopularSitesFactoryForTest( | 204 PopularSitesFactoryForTest( |
203 bool enabled, | 205 bool enabled, |
204 sync_preferences::TestingPrefServiceSyncable* pref_service) | 206 sync_preferences::TestingPrefServiceSyncable* pref_service) |
205 : prefs_(pref_service), | 207 : prefs_(pref_service), |
206 url_fetcher_factory_(/*default_factory=*/nullptr), | 208 url_fetcher_factory_(/*default_factory=*/nullptr), |
207 url_request_context_(new net::TestURLRequestContextGetter( | 209 url_request_context_(new net::TestURLRequestContextGetter( |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 MatchesTile("Site 4", "https://www.site4.com/", | 806 MatchesTile("Site 4", "https://www.site4.com/", |
805 NTPTileSource::TOP_SITES), | 807 NTPTileSource::TOP_SITES), |
806 MatchesTile("Site 1", "https://www.site1.com/", | 808 MatchesTile("Site 1", "https://www.site1.com/", |
807 NTPTileSource::POPULAR), | 809 NTPTileSource::POPULAR), |
808 MatchesTile("Site 2", "https://www.site2.com/", | 810 MatchesTile("Site 2", "https://www.site2.com/", |
809 NTPTileSource::POPULAR))); | 811 NTPTileSource::POPULAR))); |
810 } | 812 } |
811 | 813 |
812 } // namespace | 814 } // namespace |
813 } // namespace ntp_tiles | 815 } // namespace ntp_tiles |
OLD | NEW |