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

Side by Side Diff: chrome/browser/android/most_visited_sites_unittest.cc

Issue 1787633002: Use whitelist large icon for corresponding most visited suggestions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@icon-whitelist
Patch Set: Created 4 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
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 EXPECT_EQ(result_sites, expected_sites); 78 EXPECT_EQ(result_sites, expected_sites);
79 } 79 }
80 static scoped_ptr<MostVisitedSites::Suggestion> MakeSuggestionFrom( 80 static scoped_ptr<MostVisitedSites::Suggestion> MakeSuggestionFrom(
81 const TitleURL& title_url, 81 const TitleURL& title_url,
82 bool is_personal, 82 bool is_personal,
83 bool whitelist) { 83 bool whitelist) {
84 return make_scoped_ptr(new MostVisitedSites::Suggestion( 84 return make_scoped_ptr(new MostVisitedSites::Suggestion(
85 title_url.title, title_url.url, 85 title_url.title, title_url.url,
86 whitelist ? MostVisitedSites::WHITELIST 86 whitelist ? MostVisitedSites::WHITELIST
87 : (is_personal ? MostVisitedSites::TOP_SITES 87 : (is_personal ? MostVisitedSites::TOP_SITES
88 : MostVisitedSites::POPULAR))); 88 : MostVisitedSites::POPULAR),
89 base::FilePath()));
89 } 90 }
90 }; 91 };
91 92
92 TEST_F(MostVisitedSitesTest, PersonalSitesDefaultOrder) { 93 TEST_F(MostVisitedSitesTest, PersonalSitesDefaultOrder) {
93 TitleURL personal[] = { 94 TitleURL personal[] = {
94 TitleURL("Site 1", "https://www.site1.com/"), 95 TitleURL("Site 1", "https://www.site1.com/"),
95 TitleURL("Site 2", "https://www.site2.com/"), 96 TitleURL("Site 2", "https://www.site2.com/"),
96 TitleURL("Site 3", "https://www.site3.com/"), 97 TitleURL("Site 3", "https://www.site3.com/"),
97 TitleURL("Site 4", "https://www.site4.com/"), 98 TitleURL("Site 4", "https://www.site4.com/"),
98 }; 99 };
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool expected_source_is_personal[] = {false, true, true, false}; 228 bool expected_source_is_personal[] = {false, true, true, false};
228 Check(std::vector<TitleURL>(popular, popular + arraysize(popular)), 229 Check(std::vector<TitleURL>(popular, popular + arraysize(popular)),
229 std::vector<TitleURL>(), 230 std::vector<TitleURL>(),
230 std::vector<TitleURL>(personal, personal + arraysize(personal)), 231 std::vector<TitleURL>(personal, personal + arraysize(personal)),
231 std::vector<std::string>(old, old + arraysize(old)), old_sites_source, 232 std::vector<std::string>(old, old + arraysize(old)), old_sites_source,
232 std::vector<bool>(expected_source_is_personal, 233 std::vector<bool>(expected_source_is_personal,
233 expected_source_is_personal + 234 expected_source_is_personal +
234 arraysize(expected_source_is_personal)), 235 arraysize(expected_source_is_personal)),
235 std::vector<TitleURL>(expected, expected + arraysize(expected))); 236 std::vector<TitleURL>(expected, expected + arraysize(expected)));
236 } 237 }
OLDNEW
« chrome/browser/android/most_visited_sites.cc ('K') | « chrome/browser/android/most_visited_sites.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698