diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 20:56:49 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 20:56:49 +0000 |
commit | 9eae4e686d49213ee7dba24cdf28f13d38b99741 (patch) | |
tree | 353f674537dc93191c54033123904fc84f2eb0cd /base/file_util_unittest.cc | |
parent | ba23e5d378762bf5e7a25f8f6591674c5d25e365 (diff) | |
download | chromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.zip chromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.tar.gz chromium_src-9eae4e686d49213ee7dba24cdf28f13d38b99741.tar.bz2 |
Move more file_util functions to base namespace.
This moves DevicePathToDriveLetterPath, NormalizeToNativeFilePath, IsLink, and GetFileInfo.
This also removes some explicit "base::" usage in base files I touched.
TBR=jam
Review URL: https://codereview.chromium.org/105293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_unittest.cc')
-rw-r--r-- | base/file_util_unittest.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 0460c6e..38bfbc0 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -434,14 +434,13 @@ TEST_F(FileUtilTest, DevicePathToDriveLetter) { // Run DevicePathToDriveLetterPath() on the NT style path we got from // QueryDosDevice(). Expect the drive letter we started with. - ASSERT_TRUE(file_util::DevicePathToDriveLetterPath(actual_device_path, - &win32_path)); + ASSERT_TRUE(DevicePathToDriveLetterPath(actual_device_path, &win32_path)); ASSERT_EQ(real_drive_letter, win32_path.value()); // Add some directories to the path. Expect those extra path componenets // to be preserved. FilePath kRelativePath(FPL("dir1\\dir2\\file.txt")); - ASSERT_TRUE(file_util::DevicePathToDriveLetterPath( + ASSERT_TRUE(DevicePathToDriveLetterPath( actual_device_path.Append(kRelativePath), &win32_path)); EXPECT_EQ(FilePath(real_drive_letter + L"\\").Append(kRelativePath).value(), @@ -459,11 +458,10 @@ TEST_F(FileUtilTest, DevicePathToDriveLetter) { ASSERT_LT(0, new_length); FilePath prefix_of_real_device_path( actual_device_path.value().substr(0, new_length)); - ASSERT_FALSE(file_util::DevicePathToDriveLetterPath( - prefix_of_real_device_path, - &win32_path)); + ASSERT_FALSE(DevicePathToDriveLetterPath(prefix_of_real_device_path, + &win32_path)); - ASSERT_FALSE(file_util::DevicePathToDriveLetterPath( + ASSERT_FALSE(DevicePathToDriveLetterPath( prefix_of_real_device_path.Append(kRelativePath), &win32_path)); @@ -478,11 +476,11 @@ TEST_F(FileUtilTest, DevicePathToDriveLetter) { FilePath real_device_path_plus_numbers( actual_device_path.value() + kExtraChars); - ASSERT_FALSE(file_util::DevicePathToDriveLetterPath( + ASSERT_FALSE(DevicePathToDriveLetterPath( real_device_path_plus_numbers, &win32_path)); - ASSERT_FALSE(file_util::DevicePathToDriveLetterPath( + ASSERT_FALSE(DevicePathToDriveLetterPath( real_device_path_plus_numbers.Append(kRelativePath), &win32_path)); } @@ -696,14 +694,14 @@ TEST_F(FileUtilTest, DeleteSymlinkToNonExistentFile) { << "Failed to create symlink."; // Make sure the symbolic link is exist. - EXPECT_TRUE(file_util::IsLink(file_link)); + EXPECT_TRUE(IsLink(file_link)); EXPECT_FALSE(PathExists(file_link)); // Delete the symbolic link. EXPECT_TRUE(DeleteFile(file_link, false)); // Make sure the symbolic link is deleted. - EXPECT_FALSE(file_util::IsLink(file_link)); + EXPECT_FALSE(IsLink(file_link)); } TEST_F(FileUtilTest, ChangeFilePermissionsAndRead) { @@ -1915,7 +1913,7 @@ TEST_F(FileUtilTest, TouchFile) { ASSERT_TRUE(file_util::TouchFile(foobar, access_time, modification_time)); PlatformFileInfo file_info; - ASSERT_TRUE(file_util::GetFileInfo(foobar, &file_info)); + ASSERT_TRUE(GetFileInfo(foobar, &file_info)); EXPECT_EQ(file_info.last_accessed.ToInternalValue(), access_time.ToInternalValue()); EXPECT_EQ(file_info.last_modified.ToInternalValue(), |