summaryrefslogtreecommitdiffstats
path: root/chrome/common/zip_unittest.cc
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 06:59:34 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 06:59:34 +0000
commitb3eb3dd267175a02c621504c5e6c0ade4ea8a750 (patch)
treedb0a3ce350aa579e418104ae4cba5ca4633030bf /chrome/common/zip_unittest.cc
parent458ea069d469d13625eefb27b7d26caeb20a3c96 (diff)
downloadchromium_src-b3eb3dd267175a02c621504c5e6c0ade4ea8a750.zip
chromium_src-b3eb3dd267175a02c621504c5e6c0ade4ea8a750.tar.gz
chromium_src-b3eb3dd267175a02c621504c5e6c0ade4ea8a750.tar.bz2
Put zip functions into 'zip' namespace.
Along the way, rename one of the two versions of Zip() to ZipWithFilterCallback() per the C++ style guide that prohibits function overloading like this. TEST=chrome and tests build BUG=none Review URL: http://codereview.chromium.org/8381027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/zip_unittest.cc')
-rw-r--r--chrome/common/zip_unittest.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/common/zip_unittest.cc b/chrome/common/zip_unittest.cc
index 66aec32..dfffd09 100644
--- a/chrome/common/zip_unittest.cc
+++ b/chrome/common/zip_unittest.cc
@@ -50,7 +50,7 @@ class ZipTest : public PlatformTest {
void TestUnzipFile(const FilePath& path, bool expect_hidden_files) {
ASSERT_TRUE(file_util::PathExists(path)) << "no file " << path.value();
- ASSERT_TRUE(Unzip(path, test_dir_));
+ ASSERT_TRUE(zip::Unzip(path, test_dir_));
file_util::FileEnumerator files(test_dir_, true,
static_cast<file_util::FileEnumerator::FileType>(
@@ -99,7 +99,7 @@ TEST_F(ZipTest, UnzipEvil) {
FilePath path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path));
path = path.AppendASCII("zip").AppendASCII("evil.zip");
- ASSERT_FALSE(Unzip(path, test_dir_));
+ ASSERT_FALSE(zip::Unzip(path, test_dir_));
FilePath evil_file = test_dir_;
evil_file = evil_file.AppendASCII(
"../levilevilevilevilevilevilevilevilevilevilevilevil");
@@ -110,7 +110,7 @@ TEST_F(ZipTest, UnzipEvil2) {
FilePath path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path));
path = path.AppendASCII("zip").AppendASCII("evil_via_invalid_utf8.zip");
- ASSERT_TRUE(Unzip(path, test_dir_));
+ ASSERT_TRUE(zip::Unzip(path, test_dir_));
FilePath evil_file = test_dir_;
evil_file = evil_file.AppendASCII("../evil.txt");
ASSERT_FALSE(file_util::PathExists(evil_file));
@@ -125,7 +125,7 @@ TEST_F(ZipTest, Zip) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath zip_file = temp_dir.path().AppendASCII("out.zip");
- EXPECT_TRUE(Zip(src_dir, zip_file, true));
+ EXPECT_TRUE(zip::Zip(src_dir, zip_file, true));
TestUnzipFile(zip_file, true);
}
@@ -138,7 +138,7 @@ TEST_F(ZipTest, ZipIgnoreHidden) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
FilePath zip_file = temp_dir.path().AppendASCII("out.zip");
- EXPECT_TRUE(Zip(src_dir, zip_file, false));
+ EXPECT_TRUE(zip::Zip(src_dir, zip_file, false));
TestUnzipFile(zip_file, false);
}