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 "third_party/zlib/google/zip_reader.h" | 5 #include "third_party/zlib/google/zip_reader.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | |
12 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/files/file_util.h" |
13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/md5.h" | 15 #include "base/md5.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "testing/platform_test.h" | 22 #include "testing/platform_test.h" |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 567 |
568 // More than necessary byte read limit: must pass. | 568 // More than necessary byte read limit: must pass. |
569 EXPECT_TRUE(reader.ExtractCurrentEntryToString(16, &contents)); | 569 EXPECT_TRUE(reader.ExtractCurrentEntryToString(16, &contents)); |
570 EXPECT_EQ(i, contents.size()); | 570 EXPECT_EQ(i, contents.size()); |
571 EXPECT_EQ(0, memcmp(contents.c_str(), "0123456", i)); | 571 EXPECT_EQ(0, memcmp(contents.c_str(), "0123456", i)); |
572 } | 572 } |
573 reader.Close(); | 573 reader.Close(); |
574 } | 574 } |
575 | 575 |
576 } // namespace zip | 576 } // namespace zip |
OLD | NEW |