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

Side by Side Diff: components/ntp_tiles/popular_sites_impl_unittest.cc

Issue 2728773004: Undo publication of default popular sites (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « components/ntp_tiles/popular_sites_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/popular_sites_impl.h" 5 #include "components/ntp_tiles/popular_sites_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 ::testing::Matcher<const base::string16&> Str16Eq(const std::string& s) { 51 ::testing::Matcher<const base::string16&> Str16Eq(const std::string& s) {
52 return ::testing::Eq(base::UTF8ToUTF16(s)); 52 return ::testing::Eq(base::UTF8ToUTF16(s));
53 } 53 }
54 54
55 ::testing::Matcher<const GURL&> URLEq(const std::string& s) { 55 ::testing::Matcher<const GURL&> URLEq(const std::string& s) {
56 return ::testing::Eq(GURL(s)); 56 return ::testing::Eq(GURL(s));
57 } 57 }
58 58
59 size_t GetNumberOfDefaultPopularSitesForPlatform() { 59 size_t GetNumberOfDefaultPopularSitesForPlatform() {
60 #if defined(OS_ANDROID) || defined(OS_IOS) 60 #if 0 && (defined(OS_ANDROID) || defined(OS_IOS))
61 return 8ul; 61 return 8ul;
62 #else 62 #else
63 return 0; 63 return 0;
64 #endif 64 #endif
65 } 65 }
66 66
67 class PopularSitesTest : public ::testing::Test { 67 class PopularSitesTest : public ::testing::Test {
68 protected: 68 protected:
69 PopularSitesTest() 69 PopularSitesTest()
70 : kWikipedia{ 70 : kWikipedia{
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 "https://www.gstatic.com/chrome/ntp/suggested_sites_ZZ_9.json", 431 "https://www.gstatic.com/chrome/ntp/suggested_sites_ZZ_9.json",
432 {kChromium}); 432 {kChromium});
433 EXPECT_THAT(FetchPopularSites(/*force_download=*/false, &sites), 433 EXPECT_THAT(FetchPopularSites(/*force_download=*/false, &sites),
434 Eq(base::Optional<bool>(true))); 434 Eq(base::Optional<bool>(true)));
435 ASSERT_THAT(sites.size(), Eq(1u)); 435 ASSERT_THAT(sites.size(), Eq(1u));
436 EXPECT_THAT(sites[0].url, URLEq("https://www.chromium.org/")); 436 EXPECT_THAT(sites[0].url, URLEq("https://www.chromium.org/"));
437 } 437 }
438 438
439 } // namespace 439 } // namespace
440 } // namespace ntp_tiles 440 } // namespace ntp_tiles
OLDNEW
« no previous file with comments | « components/ntp_tiles/popular_sites_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698