summaryrefslogtreecommitdiffstats
path: root/base/path_service_unittest.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-17 05:07:23 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-17 05:07:23 +0000
commit023ad6abe4b833b9478992176b13b5a073895cdc (patch)
tree2f73c09690e0ccd85fff810c7db4404a5245aeca /base/path_service_unittest.cc
parent9e784dabf6278e848f081c7c24137ef8cc03671b (diff)
downloadchromium_src-023ad6abe4b833b9478992176b13b5a073895cdc.zip
chromium_src-023ad6abe4b833b9478992176b13b5a073895cdc.tar.gz
chromium_src-023ad6abe4b833b9478992176b13b5a073895cdc.tar.bz2
Replace FilePath with base::FilePath.
This is im preparation for removing the 'using" in file_path.h Review URL: https://codereview.chromium.org/12286020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service_unittest.cc')
-rw-r--r--base/path_service_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc
index b71f078..7c0f036 100644
--- a/base/path_service_unittest.cc
+++ b/base/path_service_unittest.cc
@@ -26,7 +26,7 @@ namespace {
// Returns true if PathService::Get returns true and sets the path parameter
// to non-empty for the given PathService::DirType enumeration value.
bool ReturnsValidPath(int dir_type) {
- FilePath path;
+ base::FilePath path;
bool result = PathService::Get(dir_type, &path);
// Some paths might not exist on some platforms in which case confirming
@@ -81,7 +81,7 @@ bool ReturnsValidPath(int dir_type) {
// of Windows. Checks that the function fails and that the returned path is
// empty.
bool ReturnsInvalidPath(int dir_type) {
- FilePath path;
+ base::FilePath path;
bool result = PathService::Get(dir_type, &path);
return !result && path.empty();
}
@@ -152,13 +152,13 @@ TEST_F(PathServiceTest, Override) {
int my_special_key = 666;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath fake_cache_dir(temp_dir.path().AppendASCII("cache"));
+ base::FilePath fake_cache_dir(temp_dir.path().AppendASCII("cache"));
// PathService::Override should always create the path provided if it doesn't
// exist.
EXPECT_TRUE(PathService::Override(my_special_key, fake_cache_dir));
EXPECT_TRUE(file_util::PathExists(fake_cache_dir));
- FilePath fake_cache_dir2(temp_dir.path().AppendASCII("cache2"));
+ base::FilePath fake_cache_dir2(temp_dir.path().AppendASCII("cache2"));
// PathService::OverrideAndCreateIfNeeded should obey the |create| parameter.
PathService::OverrideAndCreateIfNeeded(my_special_key,
fake_cache_dir2,
@@ -175,17 +175,17 @@ TEST_F(PathServiceTest, OverrideMultiple) {
int my_special_key = 666;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath fake_cache_dir1(temp_dir.path().AppendASCII("1"));
+ base::FilePath fake_cache_dir1(temp_dir.path().AppendASCII("1"));
EXPECT_TRUE(PathService::Override(my_special_key, fake_cache_dir1));
EXPECT_TRUE(file_util::PathExists(fake_cache_dir1));
ASSERT_EQ(1, file_util::WriteFile(fake_cache_dir1.AppendASCII("t1"), ".", 1));
- FilePath fake_cache_dir2(temp_dir.path().AppendASCII("2"));
+ base::FilePath fake_cache_dir2(temp_dir.path().AppendASCII("2"));
EXPECT_TRUE(PathService::Override(my_special_key + 1, fake_cache_dir2));
EXPECT_TRUE(file_util::PathExists(fake_cache_dir2));
ASSERT_EQ(1, file_util::WriteFile(fake_cache_dir2.AppendASCII("t2"), ".", 1));
- FilePath result;
+ base::FilePath result;
EXPECT_TRUE(PathService::Get(my_special_key, &result));
// Override might have changed the path representation but our test file
// should be still there.
@@ -199,14 +199,14 @@ TEST_F(PathServiceTest, RemoveOverride) {
// clear any overrides that might have been left from other tests.
PathService::RemoveOverride(base::DIR_TEMP);
- FilePath original_user_data_dir;
+ base::FilePath original_user_data_dir;
EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &original_user_data_dir));
EXPECT_FALSE(PathService::RemoveOverride(base::DIR_TEMP));
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
EXPECT_TRUE(PathService::Override(base::DIR_TEMP, temp_dir.path()));
- FilePath new_user_data_dir;
+ base::FilePath new_user_data_dir;
EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &new_user_data_dir));
EXPECT_NE(original_user_data_dir, new_user_data_dir);