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

Unified Diff: base/file_util_unittest.cc

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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 | « base/file_util_posix.cc ('k') | base/file_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_unittest.cc
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index e56192faeaa304d318814b15779183b6dcc6890a..5576548df642acb2f1f7d6d00a5e1319bf13c614 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -1147,7 +1147,7 @@ TEST_F(FileUtilTest, MoveNew) {
EXPECT_FALSE(base::Move(file_name_from, file_name_to));
EXPECT_TRUE(file_util::PathExists(file_name_from));
EXPECT_FALSE(file_util::PathExists(file_name_to));
- EXPECT_TRUE(base::MoveUnsafe(file_name_from, file_name_to));
+ EXPECT_TRUE(base::internal::MoveUnsafe(file_name_from, file_name_to));
EXPECT_FALSE(file_util::PathExists(file_name_from));
EXPECT_TRUE(file_util::PathExists(file_name_to));
}
@@ -1224,7 +1224,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyNew) {
ASSERT_FALSE(file_util::PathExists(dir_name_to));
- EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, true));
+ EXPECT_TRUE(base::CopyDirectory(dir_name_from, dir_name_to, true));
// Check everything has been copied.
EXPECT_TRUE(file_util::PathExists(dir_name_from));
@@ -1279,7 +1279,7 @@ TEST_F(FileUtilTest, CopyDirectoryRecursivelyExists) {
file_util::CreateDirectory(dir_name_exists);
ASSERT_TRUE(file_util::PathExists(dir_name_exists));
- EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_exists, true));
+ EXPECT_TRUE(base::CopyDirectory(dir_name_from, dir_name_exists, true));
// Check everything has been copied.
EXPECT_TRUE(file_util::PathExists(dir_name_from));
@@ -1327,7 +1327,7 @@ TEST_F(FileUtilTest, CopyDirectoryNew) {
ASSERT_FALSE(file_util::PathExists(dir_name_to));
- EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, false));
+ EXPECT_TRUE(base::CopyDirectory(dir_name_from, dir_name_to, false));
// Check everything has been copied.
EXPECT_TRUE(file_util::PathExists(dir_name_from));
@@ -1376,7 +1376,7 @@ TEST_F(FileUtilTest, CopyDirectoryExists) {
file_util::CreateDirectory(dir_name_to);
ASSERT_TRUE(file_util::PathExists(dir_name_to));
- EXPECT_TRUE(file_util::CopyDirectory(dir_name_from, dir_name_to, false));
+ EXPECT_TRUE(base::CopyDirectory(dir_name_from, dir_name_to, false));
// Check everything has been copied.
EXPECT_TRUE(file_util::PathExists(dir_name_from));
@@ -1400,7 +1400,7 @@ TEST_F(FileUtilTest, CopyFileWithCopyDirectoryRecursiveToNew) {
FILE_PATH_LITERAL("Copy_Test_File_Destination.txt"));
ASSERT_FALSE(file_util::PathExists(file_name_to));
- EXPECT_TRUE(file_util::CopyDirectory(file_name_from, file_name_to, true));
+ EXPECT_TRUE(base::CopyDirectory(file_name_from, file_name_to, true));
// Check the has been copied
EXPECT_TRUE(file_util::PathExists(file_name_to));
@@ -1419,7 +1419,7 @@ TEST_F(FileUtilTest, CopyFileWithCopyDirectoryRecursiveToExisting) {
CreateTextFile(file_name_to, L"Old file content");
ASSERT_TRUE(file_util::PathExists(file_name_to));
- EXPECT_TRUE(file_util::CopyDirectory(file_name_from, file_name_to, true));
+ EXPECT_TRUE(base::CopyDirectory(file_name_from, file_name_to, true));
// Check the has been copied
EXPECT_TRUE(file_util::PathExists(file_name_to));
@@ -1441,7 +1441,7 @@ TEST_F(FileUtilTest, CopyFileWithCopyDirectoryRecursiveToExistingDirectory) {
FilePath file_name_to =
dir_name_to.Append(FILE_PATH_LITERAL("Copy_Test_File.txt"));
- EXPECT_TRUE(file_util::CopyDirectory(file_name_from, dir_name_to, true));
+ EXPECT_TRUE(base::CopyDirectory(file_name_from, dir_name_to, true));
// Check the has been copied
EXPECT_TRUE(file_util::PathExists(file_name_to));
@@ -1475,7 +1475,7 @@ TEST_F(FileUtilTest, CopyDirectoryWithTrailingSeparators) {
temp_dir_.path().Append(FILE_PATH_LITERAL("Copy_From_Subdir///"));
#endif
- EXPECT_TRUE(file_util::CopyDirectory(from_path, dir_name_to, true));
+ EXPECT_TRUE(base::CopyDirectory(from_path, dir_name_to, true));
// Check everything has been copied.
EXPECT_TRUE(file_util::PathExists(dir_name_from));
@@ -1500,14 +1500,14 @@ TEST_F(FileUtilTest, CopyFile) {
// Copy the file.
FilePath dest_file = dir_name_from.Append(FILE_PATH_LITERAL("DestFile.txt"));
- ASSERT_TRUE(file_util::CopyFile(file_name_from, dest_file));
+ ASSERT_TRUE(base::CopyFile(file_name_from, dest_file));
// Copy the file to another location using '..' in the path.
FilePath dest_file2(dir_name_from);
dest_file2 = dest_file2.AppendASCII("..");
dest_file2 = dest_file2.AppendASCII("DestFile.txt");
- ASSERT_FALSE(file_util::CopyFile(file_name_from, dest_file2));
- ASSERT_TRUE(file_util::CopyFileUnsafe(file_name_from, dest_file2));
+ ASSERT_FALSE(base::CopyFile(file_name_from, dest_file2));
+ ASSERT_TRUE(base::internal::CopyFileUnsafe(file_name_from, dest_file2));
FilePath dest_file2_test(dir_name_from);
dest_file2_test = dest_file2_test.DirName();
@@ -1644,7 +1644,8 @@ TEST_F(FileUtilTest, CopyAndDeleteDirectoryTest) {
ASSERT_FALSE(file_util::PathExists(dir_name_to));
- EXPECT_TRUE(file_util::CopyAndDeleteDirectory(dir_name_from, dir_name_to));
+ EXPECT_TRUE(base::internal::CopyAndDeleteDirectory(dir_name_from,
+ dir_name_to));
// Check everything has been moved.
EXPECT_FALSE(file_util::PathExists(dir_name_from));
« no previous file with comments | « base/file_util_posix.cc ('k') | base/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698