OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 new TestFolder("folder-many-files", test_date, "uid-both", 500, 500)); | 503 new TestFolder("folder-many-files", test_date, "uid-both", 500, 500)); |
504 | 504 |
505 SetupFolders(&test_folders, std::vector<AlbumInfo>(), AlbumImagesMap()); | 505 SetupFolders(&test_folders, std::vector<AlbumInfo>(), AlbumImagesMap()); |
506 VerifyFolderDirectoryList(test_folders); | 506 VerifyFolderDirectoryList(test_folders); |
507 } | 507 } |
508 | 508 |
509 TEST_F(PicasaFileUtilTest, ManyFolders) { | 509 TEST_F(PicasaFileUtilTest, ManyFolders) { |
510 ScopedVector<TestFolder> test_folders; | 510 ScopedVector<TestFolder> test_folders; |
511 base::Time test_date = base::Time::FromLocalExploded(test_date_exploded); | 511 base::Time test_date = base::Time::FromLocalExploded(test_date_exploded); |
512 | 512 |
513 // TODO(tommycli): Turn number of test folders back up to 50 (or more) once | 513 for (unsigned int i = 0; i < 50; ++i) { |
514 // https://codereview.chromium.org/15479003/ lands. | |
515 for (unsigned int i = 0; i < 25; ++i) { | |
516 base::Time date = test_date - base::TimeDelta::FromDays(i); | 514 base::Time date = test_date - base::TimeDelta::FromDays(i); |
517 | 515 |
518 test_folders.push_back( | 516 test_folders.push_back( |
519 new TestFolder(base::StringPrintf("folder-%05d", i), | 517 new TestFolder(base::StringPrintf("folder-%05d", i), |
520 date, | 518 date, |
521 base::StringPrintf("uid%05d", i), i % 5, i % 3)); | 519 base::StringPrintf("uid%05d", i), i % 5, i % 3)); |
522 } | 520 } |
523 | 521 |
524 SetupFolders(&test_folders, std::vector<AlbumInfo>(), AlbumImagesMap()); | 522 SetupFolders(&test_folders, std::vector<AlbumInfo>(), AlbumImagesMap()); |
525 VerifyFolderDirectoryList(test_folders); | 523 VerifyFolderDirectoryList(test_folders); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 operation_runner()->CreateSnapshotFile( | 592 operation_runner()->CreateSnapshotFile( |
595 CreateURL(std::string(kPicasaDirAlbums) + | 593 CreateURL(std::string(kPicasaDirAlbums) + |
596 "/albumname 2013-04-16/mapped_name.jpg"), | 594 "/albumname 2013-04-16/mapped_name.jpg"), |
597 snapshot_callback); | 595 snapshot_callback); |
598 loop.Run(); | 596 loop.Run(); |
599 EXPECT_EQ(base::File::FILE_OK, error); | 597 EXPECT_EQ(base::File::FILE_OK, error); |
600 EXPECT_EQ(image_path, platform_path_result); | 598 EXPECT_EQ(image_path, platform_path_result); |
601 } | 599 } |
602 | 600 |
603 } // namespace picasa | 601 } // namespace picasa |
OLD | NEW |