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

Unified Diff: chrome/browser/history/url_utils_unittest.cc

Issue 655413002: Convert ARRAYSIZE_UNSAFE -> arraysize in chrome/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/top_sites_cache_unittest.cc ('k') | chrome/browser/locale_tests_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/url_utils_unittest.cc
diff --git a/chrome/browser/history/url_utils_unittest.cc b/chrome/browser/history/url_utils_unittest.cc
index 8df0d8691dc8cb06c563f72326efceec12a0d8cd..970c5c063d60d42cf117c232ead8ca010e23ab51 100644
--- a/chrome/browser/history/url_utils_unittest.cc
+++ b/chrome/browser/history/url_utils_unittest.cc
@@ -33,11 +33,11 @@ TEST(HistoryUrlUtilsTest, CanonicalURLStringCompare) {
"http://www.google.com:80/",
"https://www.google.com",
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(sorted_list); ++i) {
+ for (size_t i = 0; i < arraysize(sorted_list); ++i) {
EXPECT_FALSE(CanonicalURLStringCompare(sorted_list[i], sorted_list[i]))
<< " for \"" << sorted_list[i] << "\" < \"" << sorted_list[i] << "\"";
// Every disjoint pair-wise comparison.
- for (size_t j = i + 1; j < ARRAYSIZE_UNSAFE(sorted_list); ++j) {
+ for (size_t j = i + 1; j < arraysize(sorted_list); ++j) {
EXPECT_TRUE(CanonicalURLStringCompare(sorted_list[i], sorted_list[j]))
<< " for \"" << sorted_list[i] << "\" < \"" << sorted_list[j] << "\"";
EXPECT_FALSE(CanonicalURLStringCompare(sorted_list[j], sorted_list[i]))
@@ -61,7 +61,7 @@ TEST(HistoryUrlUtilsTest, HaveSameSchemeHostAndPort) {
{"http://www.google.com/test", "http://www.google.com/test/with/dir/"},
{"http://www.google.com/test?", "http://www.google.com/test/with/dir/"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(true_cases); ++i) {
+ for (size_t i = 0; i < arraysize(true_cases); ++i) {
EXPECT_TRUE(HaveSameSchemeHostAndPort(GURL(true_cases[i].s1),
GURL(true_cases[i].s2)))
<< " for true_cases[" << i << "]";
@@ -76,7 +76,7 @@ TEST(HistoryUrlUtilsTest, HaveSameSchemeHostAndPort) {
{"http://www.google.com/path", "http://www.google.com:137/path"},
{"http://www.google.com/same/dir", "http://www.youtube.com/same/dir"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(false_cases); ++i) {
+ for (size_t i = 0; i < arraysize(false_cases); ++i) {
EXPECT_FALSE(HaveSameSchemeHostAndPort(GURL(false_cases[i].s1),
GURL(false_cases[i].s2)))
<< " for false_cases[" << i << "]";
@@ -96,7 +96,7 @@ TEST(HistoryUrlUtilsTest, IsPathPrefix) {
{"/test", "/test/with/dir/"},
{"/test/", "/test/with/dir"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(true_cases); ++i) {
+ for (size_t i = 0; i < arraysize(true_cases); ++i) {
EXPECT_TRUE(IsPathPrefix(true_cases[i].p1, true_cases[i].p2))
<< " for true_cases[" << i << "]";
}
@@ -111,7 +111,7 @@ TEST(HistoryUrlUtilsTest, IsPathPrefix) {
{"/test", "/test-bed"},
{"/test-", "/test"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(false_cases); ++i) {
+ for (size_t i = 0; i < arraysize(false_cases); ++i) {
EXPECT_FALSE(IsPathPrefix(false_cases[i].p1, false_cases[i].p2))
<< " for false_cases[" << i << "]";
}
« no previous file with comments | « chrome/browser/history/top_sites_cache_unittest.cc ('k') | chrome/browser/locale_tests_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698