| 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 <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" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/android/most_visited_sites.h" | 12 #include "chrome/browser/android/ntp/most_visited_sites.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 struct TitleURL { | 17 struct TitleURL { |
| 18 TitleURL(const std::string& title, const std::string& url) | 18 TitleURL(const std::string& title, const std::string& url) |
| 19 : title(base::UTF8ToUTF16(title)), url(url) {} | 19 : title(base::UTF8ToUTF16(title)), url(url) {} |
| 20 TitleURL(const base::string16& title, const std::string& url) | 20 TitleURL(const base::string16& title, const std::string& url) |
| 21 : title(title), url(url) {} | 21 : title(title), url(url) {} |
| 22 | 22 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 bool expected_source_is_personal[] = {false, true, true, false}; | 230 bool expected_source_is_personal[] = {false, true, true, false}; |
| 231 Check(std::vector<TitleURL>(popular, popular + arraysize(popular)), | 231 Check(std::vector<TitleURL>(popular, popular + arraysize(popular)), |
| 232 std::vector<TitleURL>(), | 232 std::vector<TitleURL>(), |
| 233 std::vector<TitleURL>(personal, personal + arraysize(personal)), | 233 std::vector<TitleURL>(personal, personal + arraysize(personal)), |
| 234 std::vector<std::string>(old, old + arraysize(old)), old_sites_source, | 234 std::vector<std::string>(old, old + arraysize(old)), old_sites_source, |
| 235 std::vector<bool>(expected_source_is_personal, | 235 std::vector<bool>(expected_source_is_personal, |
| 236 expected_source_is_personal + | 236 expected_source_is_personal + |
| 237 arraysize(expected_source_is_personal)), | 237 arraysize(expected_source_is_personal)), |
| 238 std::vector<TitleURL>(expected, expected + arraysize(expected))); | 238 std::vector<TitleURL>(expected, expected + arraysize(expected))); |
| 239 } | 239 } |
| OLD | NEW |