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

Unified Diff: chrome/installer/util/create_dir_work_item_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 | « chrome/installer/util/create_dir_work_item.cc ('k') | chrome/installer/util/delete_tree_work_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/create_dir_work_item_unittest.cc
diff --git a/chrome/installer/util/create_dir_work_item_unittest.cc b/chrome/installer/util/create_dir_work_item_unittest.cc
index 1dce3ece62ef5ba8b53f746d00366c17c2f058dd..ba3e81ba74759d5312870817a6e3177efbaf45ce 100644
--- a/chrome/installer/util/create_dir_work_item_unittest.cc
+++ b/chrome/installer/util/create_dir_work_item_unittest.cc
@@ -29,7 +29,7 @@ TEST_F(CreateDirWorkItemTest, CreatePath) {
base::FilePath parent_dir(temp_dir_.path());
parent_dir = parent_dir.AppendASCII("a");
file_util::CreateDirectory(parent_dir);
- ASSERT_TRUE(file_util::PathExists(parent_dir));
+ ASSERT_TRUE(base::PathExists(parent_dir));
base::FilePath top_dir_to_create(parent_dir);
top_dir_to_create = top_dir_to_create.AppendASCII("b");
@@ -43,33 +43,33 @@ TEST_F(CreateDirWorkItemTest, CreatePath) {
EXPECT_TRUE(work_item->Do());
- EXPECT_TRUE(file_util::PathExists(dir_to_create));
+ EXPECT_TRUE(base::PathExists(dir_to_create));
work_item->Rollback();
// Rollback should delete all the paths up to top_dir_to_create.
- EXPECT_FALSE(file_util::PathExists(top_dir_to_create));
- EXPECT_TRUE(file_util::PathExists(parent_dir));
+ EXPECT_FALSE(base::PathExists(top_dir_to_create));
+ EXPECT_TRUE(base::PathExists(parent_dir));
}
TEST_F(CreateDirWorkItemTest, CreateExistingPath) {
base::FilePath dir_to_create(temp_dir_.path());
dir_to_create = dir_to_create.AppendASCII("aa");
file_util::CreateDirectory(dir_to_create);
- ASSERT_TRUE(file_util::PathExists(dir_to_create));
+ ASSERT_TRUE(base::PathExists(dir_to_create));
scoped_ptr<CreateDirWorkItem> work_item(
WorkItem::CreateCreateDirWorkItem(dir_to_create));
EXPECT_TRUE(work_item->Do());
- EXPECT_TRUE(file_util::PathExists(dir_to_create));
+ EXPECT_TRUE(base::PathExists(dir_to_create));
work_item->Rollback();
// Rollback should not remove the path since it exists before
// the CreateDirWorkItem is called.
- EXPECT_TRUE(file_util::PathExists(dir_to_create));
+ EXPECT_TRUE(base::PathExists(dir_to_create));
}
TEST_F(CreateDirWorkItemTest, CreateSharedPath) {
@@ -87,22 +87,22 @@ TEST_F(CreateDirWorkItemTest, CreateSharedPath) {
EXPECT_TRUE(work_item->Do());
- EXPECT_TRUE(file_util::PathExists(dir_to_create_3));
+ EXPECT_TRUE(base::PathExists(dir_to_create_3));
// Create another directory under dir_to_create_2
base::FilePath dir_to_create_4(dir_to_create_2);
dir_to_create_4 = dir_to_create_4.AppendASCII("ddd");
file_util::CreateDirectory(dir_to_create_4);
- ASSERT_TRUE(file_util::PathExists(dir_to_create_4));
+ ASSERT_TRUE(base::PathExists(dir_to_create_4));
work_item->Rollback();
// Rollback should delete dir_to_create_3.
- EXPECT_FALSE(file_util::PathExists(dir_to_create_3));
+ EXPECT_FALSE(base::PathExists(dir_to_create_3));
// Rollback should not delete dir_to_create_2 as it is shared.
- EXPECT_TRUE(file_util::PathExists(dir_to_create_2));
- EXPECT_TRUE(file_util::PathExists(dir_to_create_4));
+ EXPECT_TRUE(base::PathExists(dir_to_create_2));
+ EXPECT_TRUE(base::PathExists(dir_to_create_4));
}
TEST_F(CreateDirWorkItemTest, RollbackWithMissingDir) {
@@ -120,14 +120,14 @@ TEST_F(CreateDirWorkItemTest, RollbackWithMissingDir) {
EXPECT_TRUE(work_item->Do());
- EXPECT_TRUE(file_util::PathExists(dir_to_create_3));
+ EXPECT_TRUE(base::PathExists(dir_to_create_3));
RemoveDirectory(dir_to_create_3.value().c_str());
- ASSERT_FALSE(file_util::PathExists(dir_to_create_3));
+ ASSERT_FALSE(base::PathExists(dir_to_create_3));
work_item->Rollback();
// dir_to_create_3 has already been deleted, Rollback should delete
// the rest.
- EXPECT_FALSE(file_util::PathExists(dir_to_create_1));
+ EXPECT_FALSE(base::PathExists(dir_to_create_1));
}
« no previous file with comments | « chrome/installer/util/create_dir_work_item.cc ('k') | chrome/installer/util/delete_tree_work_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698