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

Unified Diff: Source/platform/weborigin/DatabaseIdentifierTest.cpp

Issue 666593002: Convert ARRAYSIZE_UNSAFE -> arraysize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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 | « Source/core/loader/MixedContentCheckerTest.cpp ('k') | Source/platform/weborigin/KURLTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/DatabaseIdentifierTest.cpp
diff --git a/Source/platform/weborigin/DatabaseIdentifierTest.cpp b/Source/platform/weborigin/DatabaseIdentifierTest.cpp
index 0ad5dc81ca4a56c0f4fdbb0fca0ad9aef556e18c..928eb8bd0c0f7e686032e95dead8c032ae71dc43 100644
--- a/Source/platform/weborigin/DatabaseIdentifierTest.cpp
+++ b/Source/platform/weborigin/DatabaseIdentifierTest.cpp
@@ -66,7 +66,7 @@ TEST(DatabaseIdentifierTest, CreateIdentifierFromSecurityOrigin)
{"non-standard", "foobar.com", 0, "non-standard__0"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
RefPtr<SecurityOrigin> origin = SecurityOrigin::create(cases[i].protocol, cases[i].host, cases[i].port);
String identifier = createDatabaseIdentifierFromSecurityOrigin(origin.get());
EXPECT_EQ(cases[i].expectedIdentifier, identifier) << "test case " << origin->toString();
@@ -188,7 +188,7 @@ TEST(DatabaseIdentifierTest, CreateIdentifierAllHostChars)
{"x\x80x", "__0", false},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
RefPtr<SecurityOrigin> origin = SecurityOrigin::create("http", cases[i].hostname, 80);
String identifier = createDatabaseIdentifierFromSecurityOrigin(origin.get());
EXPECT_EQ(cases[i].expected, identifier) << "test case " << i << ": \"" << cases[i].hostname << "\"";
@@ -225,7 +225,7 @@ TEST(DatabaseIdentifierTest, CreateSecurityOriginFromIdentifier)
{"http_escaped%3Dfun.com_0", "http", "escaped%3dfun.com", 0, "http://escaped%3dfun.com", false},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(validCases); ++i) {
+ for (size_t i = 0; i < arraysize(validCases); ++i) {
RefPtr<SecurityOrigin> origin = createSecurityOriginFromDatabaseIdentifier(validCases[i].identifier);
EXPECT_EQ(validCases[i].expectedProtocol, origin->protocol()) << "test case " << i;
EXPECT_EQ(validCases[i].expectedHost, origin->host()) << "test case " << i;
@@ -251,7 +251,7 @@ TEST(DatabaseIdentifierTest, CreateSecurityOriginFromIdentifier)
"http_not_canonical_escape%3d_0",
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(bogusIdentifiers); ++i) {
+ for (size_t i = 0; i < arraysize(bogusIdentifiers); ++i) {
RefPtr<SecurityOrigin> origin = createSecurityOriginFromDatabaseIdentifier(bogusIdentifiers[i]);
EXPECT_EQ("null", origin->toString()) << "test case " << i;
EXPECT_EQ(true, origin->isUnique()) << "test case " << i;
« no previous file with comments | « Source/core/loader/MixedContentCheckerTest.cpp ('k') | Source/platform/weborigin/KURLTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698