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

Unified Diff: base/path_service_unittest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/path_service.cc ('k') | base/platform_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/path_service_unittest.cc
diff --git a/base/path_service_unittest.cc b/base/path_service_unittest.cc
index 68565cc916b6922e67fa7f09d112fb3bf04eb887..fbb2d766deb212388319b474801836fed2b6932a 100644
--- a/base/path_service_unittest.cc
+++ b/base/path_service_unittest.cc
@@ -73,7 +73,7 @@ bool ReturnsValidPath(int dir_type) {
return false;
#endif
return result && !path.empty() && (!check_path_exists ||
- file_util::PathExists(path));
+ base::PathExists(path));
}
#if defined(OS_WIN)
@@ -156,18 +156,18 @@ TEST_F(PathServiceTest, Override) {
// 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));
+ EXPECT_TRUE(base::PathExists(fake_cache_dir));
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,
false);
- EXPECT_FALSE(file_util::PathExists(fake_cache_dir2));
+ EXPECT_FALSE(base::PathExists(fake_cache_dir2));
EXPECT_TRUE(PathService::OverrideAndCreateIfNeeded(my_special_key,
fake_cache_dir2,
true));
- EXPECT_TRUE(file_util::PathExists(fake_cache_dir2));
+ EXPECT_TRUE(base::PathExists(fake_cache_dir2));
}
// Check if multiple overrides can co-exist.
@@ -177,21 +177,21 @@ TEST_F(PathServiceTest, OverrideMultiple) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
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));
+ EXPECT_TRUE(base::PathExists(fake_cache_dir1));
ASSERT_EQ(1, file_util::WriteFile(fake_cache_dir1.AppendASCII("t1"), ".", 1));
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));
+ EXPECT_TRUE(base::PathExists(fake_cache_dir2));
ASSERT_EQ(1, file_util::WriteFile(fake_cache_dir2.AppendASCII("t2"), ".", 1));
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.
- EXPECT_TRUE(file_util::PathExists(result.AppendASCII("t1")));
+ EXPECT_TRUE(base::PathExists(result.AppendASCII("t1")));
EXPECT_TRUE(PathService::Get(my_special_key + 1, &result));
- EXPECT_TRUE(file_util::PathExists(result.AppendASCII("t2")));
+ EXPECT_TRUE(base::PathExists(result.AppendASCII("t2")));
}
TEST_F(PathServiceTest, RemoveOverride) {
« no previous file with comments | « base/path_service.cc ('k') | base/platform_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698