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

Unified Diff: url/url_parse_unittest.cc

Issue 654303003: Convert ARRAYSIZE_UNSAFE -> arraysize in url/. (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 | « url/url_canon_unittest.cc ('k') | url/url_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_parse_unittest.cc
diff --git a/url/url_parse_unittest.cc b/url/url_parse_unittest.cc
index a8b7f8541ef1138ac8a02b6671c35e4a50d2af62..7f6bfe3e3362db97ef2ad157726c828a3eeb1270 100644
--- a/url/url_parse_unittest.cc
+++ b/url/url_parse_unittest.cc
@@ -4,17 +4,10 @@
#include "url/url_parse.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/url_parse.h"
-// Some implementations of base/basictypes.h may define ARRAYSIZE.
-// If it's not defined, we define it to the ARRAYSIZE_UNSAFE macro
-// which is in our version of basictypes.h.
-#ifndef ARRAYSIZE
-#define ARRAYSIZE ARRAYSIZE_UNSAFE
-#endif
-
// Interesting IE file:isms...
//
// file:/foo/bar file:///foo/bar
@@ -201,7 +194,7 @@ TEST(URLParser, CountCharactersBefore) {
{"file:///c:/foo", Parsed::HOST, true, 7},
{"file:///c:/foo", Parsed::PATH, true, 7},
};
- for (size_t i = 0; i < ARRAYSIZE(count_cases); i++) {
+ for (size_t i = 0; i < arraysize(count_cases); i++) {
int length = static_cast<int>(strlen(count_cases[i].url));
// Simple test to distinguish file and standard URLs.
@@ -509,7 +502,7 @@ TEST(URLParser, ExtractFileName) {
{"http://www.google.com/foo/bar.html?query#ref", "bar.html"},
};
- for (size_t i = 0; i < ARRAYSIZE(file_cases); i++) {
+ for (size_t i = 0; i < arraysize(file_cases); i++) {
const char* url = file_cases[i].input;
int len = static_cast<int>(strlen(url));
« no previous file with comments | « url/url_canon_unittest.cc ('k') | url/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698