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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 public: | 189 public: |
190 MOCK_METHOD1(OnMostVisitedURLsAvailable, void(const NTPTilesVector& tiles)); | 190 MOCK_METHOD1(OnMostVisitedURLsAvailable, void(const NTPTilesVector& tiles)); |
191 MOCK_METHOD1(OnIconMadeAvailable, void(const GURL& site_url)); | 191 MOCK_METHOD1(OnIconMadeAvailable, void(const GURL& site_url)); |
192 }; | 192 }; |
193 | 193 |
194 class MockIconCacher : public IconCacher { | 194 class MockIconCacher : public IconCacher { |
195 public: | 195 public: |
196 MOCK_METHOD2(StartFetch, | 196 MOCK_METHOD2(StartFetch, |
197 void(PopularSites::Site site, | 197 void(PopularSites::Site site, |
198 const base::Callback<void(bool)>& done)); | 198 const base::Callback<void(bool)>& done)); |
199 MOCK_METHOD2(AddDefaultImage, | |
200 void(const PopularSites::Site& site, int image_resource_id)); | |
sfiera
2017/02/16 18:54:16
Obsolete?
fhorschig
2017/02/17 16:24:03
Gone.
| |
199 }; | 201 }; |
200 | 202 |
201 class PopularSitesFactoryForTest { | 203 class PopularSitesFactoryForTest { |
202 public: | 204 public: |
203 PopularSitesFactoryForTest( | 205 PopularSitesFactoryForTest( |
204 bool enabled, | 206 bool enabled, |
205 sync_preferences::TestingPrefServiceSyncable* pref_service) | 207 sync_preferences::TestingPrefServiceSyncable* pref_service) |
206 : prefs_(pref_service), | 208 : prefs_(pref_service), |
207 url_fetcher_factory_(/*default_factory=*/nullptr), | 209 url_fetcher_factory_(/*default_factory=*/nullptr), |
208 url_request_context_(new net::TestURLRequestContextGetter( | 210 url_request_context_(new net::TestURLRequestContextGetter( |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
875 MatchesTile("Site 4", "https://www.site4.com/", | 877 MatchesTile("Site 4", "https://www.site4.com/", |
876 NTPTileSource::TOP_SITES), | 878 NTPTileSource::TOP_SITES), |
877 MatchesTile("Site 1", "https://www.site1.com/", | 879 MatchesTile("Site 1", "https://www.site1.com/", |
878 NTPTileSource::POPULAR), | 880 NTPTileSource::POPULAR), |
879 MatchesTile("Site 2", "https://www.site2.com/", | 881 MatchesTile("Site 2", "https://www.site2.com/", |
880 NTPTileSource::POPULAR))); | 882 NTPTileSource::POPULAR))); |
881 } | 883 } |
882 | 884 |
883 } // namespace | 885 } // namespace |
884 } // namespace ntp_tiles | 886 } // namespace ntp_tiles |
OLD | NEW |