| Index: content/browser/fileapi/sandbox_file_system_backend_unittest.cc
|
| diff --git a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
|
| index 4da805578bf02b78df6d2acf36bb176cd8450895..ee332f6f3526a44c3627f2c3cf8caafce95ad843 100644
|
| --- a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
|
| +++ b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
|
| @@ -155,8 +155,8 @@ TEST_F(SandboxFileSystemBackendTest, EnumerateOrigins) {
|
| "http://www.foo.com:8080/",
|
| "http://www.foo.com:80/",
|
| };
|
| - size_t temporary_size = ARRAYSIZE_UNSAFE(temporary_origins);
|
| - size_t persistent_size = ARRAYSIZE_UNSAFE(persistent_origins);
|
| + size_t temporary_size = arraysize(temporary_origins);
|
| + size_t persistent_size = arraysize(persistent_origins);
|
| std::set<GURL> temporary_set, persistent_set;
|
| for (size_t i = 0; i < temporary_size; ++i) {
|
| CreateOriginTypeDirectory(GURL(temporary_origins[i]),
|
| @@ -191,12 +191,11 @@ TEST_F(SandboxFileSystemBackendTest, EnumerateOrigins) {
|
| }
|
|
|
| TEST_F(SandboxFileSystemBackendTest, GetRootPathCreateAndExamine) {
|
| - std::vector<base::FilePath> returned_root_path(
|
| - ARRAYSIZE_UNSAFE(kRootPathTestCases));
|
| + std::vector<base::FilePath> returned_root_path(arraysize(kRootPathTestCases));
|
| SetUpNewBackend(CreateAllowFileAccessOptions());
|
|
|
| // Create a new root directory.
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathTestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (create) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
|
|
| @@ -216,7 +215,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathCreateAndExamine) {
|
|
|
| // Get the root directory with create=false and see if we get the
|
| // same directory.
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathTestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (get) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
|
|
| @@ -232,8 +231,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathCreateAndExamine) {
|
|
|
| TEST_F(SandboxFileSystemBackendTest,
|
| GetRootPathCreateAndExamineWithNewBackend) {
|
| - std::vector<base::FilePath> returned_root_path(
|
| - ARRAYSIZE_UNSAFE(kRootPathTestCases));
|
| + std::vector<base::FilePath> returned_root_path(arraysize(kRootPathTestCases));
|
| SetUpNewBackend(CreateAllowFileAccessOptions());
|
|
|
| GURL origin_url("http://foo.com:1/");
|
| @@ -258,7 +256,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathGetWithoutCreate) {
|
| SetUpNewBackend(CreateDisallowFileAccessOptions());
|
|
|
| // Try to get a root directory without creating.
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathTestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (create=false) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
| EXPECT_FALSE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
|
| @@ -272,7 +270,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathInIncognito) {
|
| SetUpNewBackend(CreateIncognitoFileSystemOptions());
|
|
|
| // Try to get a root directory.
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathTestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (incognito) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
| EXPECT_FALSE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
|
| @@ -284,7 +282,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathInIncognito) {
|
|
|
| TEST_F(SandboxFileSystemBackendTest, GetRootPathFileURI) {
|
| SetUpNewBackend(CreateDisallowFileAccessOptions());
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathFileURITestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathFileURITestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPathFileURI (disallow) #"
|
| << i << " " << kRootPathFileURITestCases[i].expected_path);
|
| EXPECT_FALSE(GetRootPath(GURL(kRootPathFileURITestCases[i].origin_url),
|
| @@ -296,7 +294,7 @@ TEST_F(SandboxFileSystemBackendTest, GetRootPathFileURI) {
|
|
|
| TEST_F(SandboxFileSystemBackendTest, GetRootPathFileURIWithAllowFlag) {
|
| SetUpNewBackend(CreateAllowFileAccessOptions());
|
| - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathFileURITestCases); ++i) {
|
| + for (size_t i = 0; i < arraysize(kRootPathFileURITestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPathFileURI (allow) #"
|
| << i << " " << kRootPathFileURITestCases[i].expected_path);
|
| base::FilePath root_path;
|
|
|