| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <set> | 5 #include <set> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_enumerator.h" | 9 #include "base/files/file_enumerator.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
| 16 #include "third_party/zlib/google/zip.h" | 16 #include "third_party/zlib/google/zip.h" |
| 17 #include "third_party/zlib/google/zip_reader.h" | 17 #include "third_party/zlib/google/zip_reader.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Make the test a PlatformTest to setup autorelease pools properly on Mac. | 21 // Make the test a PlatformTest to setup autorelease pools properly on Mac. |
| 22 class ZipTest : public PlatformTest { | 22 class ZipTest : public PlatformTest { |
| 23 protected: | 23 protected: |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 EXPECT_TRUE(reader.LocateAndOpenEntry(zip_file_list_[i])); | 198 EXPECT_TRUE(reader.LocateAndOpenEntry(zip_file_list_[i])); |
| 199 // Check the path in the entry just in case. | 199 // Check the path in the entry just in case. |
| 200 const zip::ZipReader::EntryInfo* entry_info = reader.current_entry_info(); | 200 const zip::ZipReader::EntryInfo* entry_info = reader.current_entry_info(); |
| 201 EXPECT_EQ(entry_info->file_path(), zip_file_list_[i]); | 201 EXPECT_EQ(entry_info->file_path(), zip_file_list_[i]); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 #endif // defined(OS_POSIX) | 204 #endif // defined(OS_POSIX) |
| 205 | 205 |
| 206 } // namespace | 206 } // namespace |
| 207 | 207 |
| OLD | NEW |