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

Unified Diff: chrome/installer/util/lzma_util_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/logging_installer_unittest.cc ('k') | chrome/installer/util/master_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/lzma_util_unittest.cc
diff --git a/chrome/installer/util/lzma_util_unittest.cc b/chrome/installer/util/lzma_util_unittest.cc
index a2fe6eb8420987f91d83166efa99fd59c6bf19da..668f42ca017325ed4f5b7b5a3b4b237f73658324 100644
--- a/chrome/installer/util/lzma_util_unittest.cc
+++ b/chrome/installer/util/lzma_util_unittest.cc
@@ -18,7 +18,7 @@ class LzmaUtilTest : public testing::Test {
virtual void SetUp() {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_dir_));
data_dir_ = data_dir_.AppendASCII("installer");
- ASSERT_TRUE(file_util::PathExists(data_dir_));
+ ASSERT_TRUE(base::PathExists(data_dir_));
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
}
@@ -55,9 +55,9 @@ TEST_F(LzmaUtilTest, OpenArchiveTest) {
TEST_F(LzmaUtilTest, UnPackTest) {
base::FilePath extract_dir(temp_dir_.path());
extract_dir = extract_dir.AppendASCII("UnPackTest");
- ASSERT_FALSE(file_util::PathExists(extract_dir));
+ ASSERT_FALSE(base::PathExists(extract_dir));
EXPECT_TRUE(file_util::CreateDirectory(extract_dir));
- ASSERT_TRUE(file_util::PathExists(extract_dir));
+ ASSERT_TRUE(base::PathExists(extract_dir));
base::FilePath archive = data_dir_.AppendASCII("archive1.7z");
LzmaUtil lzma_util;
@@ -65,14 +65,14 @@ TEST_F(LzmaUtilTest, UnPackTest) {
std::wstring unpacked_file;
EXPECT_EQ(lzma_util.UnPack(extract_dir.value(), &unpacked_file),
NO_ERROR);
- EXPECT_TRUE(file_util::PathExists(extract_dir.AppendASCII("a.exe")));
+ EXPECT_TRUE(base::PathExists(extract_dir.AppendASCII("a.exe")));
EXPECT_TRUE(unpacked_file == extract_dir.AppendASCII("a.exe").value());
archive = data_dir_.AppendASCII("archive2.7z");
EXPECT_EQ(lzma_util.OpenArchive(archive.value()), NO_ERROR);
EXPECT_EQ(lzma_util.UnPack(extract_dir.value(), &unpacked_file),
NO_ERROR);
- EXPECT_TRUE(file_util::PathExists(extract_dir.AppendASCII("b.exe")));
+ EXPECT_TRUE(base::PathExists(extract_dir.AppendASCII("b.exe")));
EXPECT_TRUE(unpacked_file == extract_dir.AppendASCII("b.exe").value());
lzma_util.CloseArchive();
@@ -87,8 +87,8 @@ TEST_F(LzmaUtilTest, UnPackTest) {
EXPECT_EQ(lzma_util.OpenArchive(archive.value()), NO_ERROR);
EXPECT_EQ(lzma_util.UnPack(extract_dir.value(), &unpacked_file),
NO_ERROR);
- EXPECT_TRUE(file_util::PathExists(extract_dir.AppendASCII("archive\\a.exe")));
- EXPECT_TRUE(file_util::PathExists(
+ EXPECT_TRUE(base::PathExists(extract_dir.AppendASCII("archive\\a.exe")));
+ EXPECT_TRUE(base::PathExists(
extract_dir.AppendASCII("archive\\sub_dir\\text.txt")));
}
@@ -96,21 +96,21 @@ TEST_F(LzmaUtilTest, UnPackTest) {
TEST_F(LzmaUtilTest, UnPackArchiveTest) {
base::FilePath extract_dir(temp_dir_.path());
extract_dir = extract_dir.AppendASCII("UnPackArchiveTest");
- ASSERT_FALSE(file_util::PathExists(extract_dir));
+ ASSERT_FALSE(base::PathExists(extract_dir));
EXPECT_TRUE(file_util::CreateDirectory(extract_dir));
- ASSERT_TRUE(file_util::PathExists(extract_dir));
+ ASSERT_TRUE(base::PathExists(extract_dir));
base::FilePath archive = data_dir_.AppendASCII("archive1.7z");
std::wstring unpacked_file;
EXPECT_EQ(LzmaUtil::UnPackArchive(archive.value(), extract_dir.value(),
&unpacked_file), NO_ERROR);
- EXPECT_TRUE(file_util::PathExists(extract_dir.AppendASCII("a.exe")));
+ EXPECT_TRUE(base::PathExists(extract_dir.AppendASCII("a.exe")));
EXPECT_TRUE(unpacked_file == extract_dir.AppendASCII("a.exe").value());
archive = data_dir_.AppendASCII("archive2.7z");
EXPECT_EQ(LzmaUtil::UnPackArchive(archive.value(), extract_dir.value(),
&unpacked_file), NO_ERROR);
- EXPECT_TRUE(file_util::PathExists(extract_dir.AppendASCII("b.exe")));
+ EXPECT_TRUE(base::PathExists(extract_dir.AppendASCII("b.exe")));
EXPECT_TRUE(unpacked_file == extract_dir.AppendASCII("b.exe").value());
archive = data_dir_.AppendASCII("invalid_archive.7z");
« no previous file with comments | « chrome/installer/util/logging_installer_unittest.cc ('k') | chrome/installer/util/master_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698