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

Side by Side Diff: content/browser/fileapi/dragged_file_util_unittest.cc

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { 320 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) {
321 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); 321 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i);
322 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; 322 const test::TestCaseRecord& test_case = kUnregisteredCases[i];
323 323
324 // Prepare the test file/directory. 324 // Prepare the test file/directory.
325 SetUpOneTestCase(root_path(), test_case); 325 SetUpOneTestCase(root_path(), test_case);
326 326
327 // Make sure regular GetFileInfo succeeds. 327 // Make sure regular GetFileInfo succeeds.
328 base::PlatformFileInfo info; 328 base::PlatformFileInfo info;
329 ASSERT_TRUE(file_util::GetFileInfo( 329 ASSERT_TRUE(base::GetFileInfo(root_path().Append(test_case.path), &info));
330 root_path().Append(test_case.path), &info));
331 if (!test_case.is_directory) 330 if (!test_case.is_directory)
332 ASSERT_EQ(test_case.data_file_size, info.size); 331 ASSERT_EQ(test_case.data_file_size, info.size);
333 ASSERT_EQ(test_case.is_directory, info.is_directory); 332 ASSERT_EQ(test_case.is_directory, info.is_directory);
334 } 333 }
335 334
336 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) { 335 for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) {
337 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i); 336 SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i);
338 const test::TestCaseRecord& test_case = kUnregisteredCases[i]; 337 const test::TestCaseRecord& test_case = kUnregisteredCases[i];
339 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path)); 338 FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
340 339
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 EXPECT_EQ(base::PLATFORM_FILE_OK, 535 EXPECT_EQ(base::PLATFORM_FILE_OK,
537 file_util()->Truncate(GetOperationContext().get(), url, 999)); 536 file_util()->Truncate(GetOperationContext().get(), url, 999));
538 ASSERT_EQ(base::PLATFORM_FILE_OK, 537 ASSERT_EQ(base::PLATFORM_FILE_OK,
539 file_util()->GetFileInfo(GetOperationContext().get(), url, 538 file_util()->GetFileInfo(GetOperationContext().get(), url,
540 &info, &platform_path)); 539 &info, &platform_path));
541 EXPECT_EQ(999, info.size); 540 EXPECT_EQ(999, info.size);
542 } 541 }
543 } 542 }
544 543
545 } // namespace fileapi 544 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698