Index: components/zip/zip_reader_unittest.cc |
diff --git a/chrome/common/zip_reader_unittest.cc b/components/zip/zip_reader_unittest.cc |
similarity index 97% |
rename from chrome/common/zip_reader_unittest.cc |
rename to components/zip/zip_reader_unittest.cc |
index fdad562604e4e61f107050cee0f77b3df2a9be84..0b4b55499953b596ce587350085cbf80f8927a0e 100644 |
--- a/chrome/common/zip_reader_unittest.cc |
+++ b/components/zip/zip_reader_unittest.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/common/zip_reader.h" |
+#include "components/zip/zip_reader.h" |
#include <set> |
#include <string> |
@@ -15,8 +15,7 @@ |
#include "base/platform_file.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
-#include "chrome/common/chrome_paths.h" |
-#include "chrome/common/zip_internal.h" |
+#include "components/zip/zip_internal.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "testing/platform_test.h" |
@@ -75,7 +74,7 @@ class ZipReaderTest : public PlatformTest { |
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
test_dir_ = temp_dir_.path(); |
- ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); |
+ ASSERT_TRUE(GetTestDataDirectory(&test_data_dir_)); |
test_data_dir_ = test_data_dir_.AppendASCII("zip"); |
test_zip_file_ = test_data_dir_.AppendASCII("test.zip"); |
@@ -102,6 +101,17 @@ class ZipReaderTest : public PlatformTest { |
PlatformTest::TearDown(); |
} |
+ bool GetTestDataDirectory(base::FilePath* path) { |
+ bool success = PathService::Get(base::DIR_SOURCE_ROOT, path); |
+ EXPECT_TRUE(success); |
+ if (!success) |
+ return false; |
+ *path = path->AppendASCII("components"); |
+ *path = path->AppendASCII("test"); |
+ *path = path->AppendASCII("data"); |
+ return true; |
+ } |
+ |
// The path to temporary directory used to contain the test operations. |
base::FilePath test_dir_; |
// The path to the test data directory where test.zip etc. are located. |