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

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

Issue 2069763003: Move ntp_tiles classes to namespace ntp_tiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/most_visited_sites.cc ('k') | components/ntp_tiles/popular_sites.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace ntp_tiles {
18
17 namespace { 19 namespace {
18 20
19 struct TitleURL { 21 struct TitleURL {
20 TitleURL(const std::string& title, const std::string& url) 22 TitleURL(const std::string& title, const std::string& url)
21 : title(base::UTF8ToUTF16(title)), url(url) {} 23 : title(base::UTF8ToUTF16(title)), url(url) {}
22 TitleURL(const base::string16& title, const std::string& url) 24 TitleURL(const base::string16& title, const std::string& url)
23 : title(title), url(url) {} 25 : title(title), url(url) {}
24 26
25 base::string16 title; 27 base::string16 title;
26 std::string url; 28 std::string url;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 std::vector<TitleURL> expected_sites{ 132 std::vector<TitleURL> expected_sites{
131 TitleURL("Site 3", "https://www.site3.com/"), 133 TitleURL("Site 3", "https://www.site3.com/"),
132 TitleURL("Site 4", "https://www.site4.com/"), 134 TitleURL("Site 4", "https://www.site4.com/"),
133 TitleURL("Site 1", "https://www.site1.com/"), 135 TitleURL("Site 1", "https://www.site1.com/"),
134 TitleURL("Site 2", "https://www.site2.com/"), 136 TitleURL("Site 2", "https://www.site2.com/"),
135 }; 137 };
136 std::vector<bool> expected_sites_source{true, true, false, false}; 138 std::vector<bool> expected_sites_source{true, true, false, false};
137 Check(popular_sites, std::vector<TitleURL>(), personal_sites, 139 Check(popular_sites, std::vector<TitleURL>(), personal_sites,
138 expected_sites_source, expected_sites); 140 expected_sites_source, expected_sites);
139 } 141 }
142
143 } // namespace ntp_tiles
OLDNEW
« no previous file with comments | « components/ntp_tiles/most_visited_sites.cc ('k') | components/ntp_tiles/popular_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698