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

Unified Diff: third_party/zlib/google/zip_unittest.cc

Issue 14021015: Move components/zip to third_party/zip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit_tests.isolate for new test data location Created 7 years, 8 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 | « third_party/zlib/google/zip_reader_unittest.cc ('k') | third_party/zlib/zlib.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_unittest.cc
diff --git a/components/zip/zip_unittest.cc b/third_party/zlib/google/zip_unittest.cc
similarity index 93%
rename from components/zip/zip_unittest.cc
rename to third_party/zlib/google/zip_unittest.cc
index b314e8cd8f131371e4237218c7935e5f8787e241..3f7911e08a3d1d635f7495daa2992ca7a1b64c8e 100644
--- a/components/zip/zip_unittest.cc
+++ b/third_party/zlib/google/zip_unittest.cc
@@ -10,10 +10,10 @@
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/string_util.h"
-#include "components/zip/zip.h"
-#include "components/zip/zip_reader.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+#include "third_party/zlib/google/zip.h"
+#include "third_party/zlib/google/zip_reader.h"
namespace {
@@ -54,7 +54,9 @@ class ZipTest : public PlatformTest {
EXPECT_TRUE(success);
if (!success)
return false;
- *path = path->AppendASCII("components");
+ *path = path->AppendASCII("third_party");
+ *path = path->AppendASCII("zlib");
+ *path = path->AppendASCII("google");
*path = path->AppendASCII("test");
*path = path->AppendASCII("data");
return true;
@@ -64,7 +66,6 @@ class ZipTest : public PlatformTest {
bool expect_hidden_files) {
base::FilePath test_dir;
ASSERT_TRUE(GetTestDataDirectory(&test_dir));
- test_dir = test_dir.AppendASCII("zip");
TestUnzipFile(test_dir.Append(filename), expect_hidden_files);
}
@@ -120,7 +121,7 @@ TEST_F(ZipTest, UnzipUncompressed) {
TEST_F(ZipTest, UnzipEvil) {
base::FilePath path;
ASSERT_TRUE(GetTestDataDirectory(&path));
- path = path.AppendASCII("zip").AppendASCII("evil.zip");
+ path = path.AppendASCII("evil.zip");
// Unzip the zip file into a sub directory of test_dir_ so evil.zip
// won't create a persistent file outside test_dir_ in case of a
// failure.
@@ -137,7 +138,7 @@ TEST_F(ZipTest, UnzipEvil2) {
ASSERT_TRUE(GetTestDataDirectory(&path));
// The zip file contains an evil file with invalid UTF-8 in its file
// name.
- path = path.AppendASCII("zip").AppendASCII("evil_via_invalid_utf8.zip");
+ path = path.AppendASCII("evil_via_invalid_utf8.zip");
// See the comment at UnzipEvil() for why we do this.
base::FilePath output_dir = test_dir_.AppendASCII("out");
// This should fail as it contains an evil file.
@@ -150,7 +151,7 @@ TEST_F(ZipTest, UnzipEvil2) {
TEST_F(ZipTest, Zip) {
base::FilePath src_dir;
ASSERT_TRUE(GetTestDataDirectory(&src_dir));
- src_dir = src_dir.AppendASCII("zip").AppendASCII("test");
+ src_dir = src_dir.AppendASCII("test");
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -163,7 +164,7 @@ TEST_F(ZipTest, Zip) {
TEST_F(ZipTest, ZipIgnoreHidden) {
base::FilePath src_dir;
ASSERT_TRUE(GetTestDataDirectory(&src_dir));
- src_dir = src_dir.AppendASCII("zip").AppendASCII("test");
+ src_dir = src_dir.AppendASCII("test");
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
@@ -177,7 +178,7 @@ TEST_F(ZipTest, ZipIgnoreHidden) {
TEST_F(ZipTest, ZipFiles) {
base::FilePath src_dir;
ASSERT_TRUE(GetTestDataDirectory(&src_dir));
- src_dir = src_dir.AppendASCII("zip").AppendASCII("test");
+ src_dir = src_dir.AppendASCII("test");
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
« no previous file with comments | « third_party/zlib/google/zip_reader_unittest.cc ('k') | third_party/zlib/zlib.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698