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

Side by Side Diff: chrome/utility/media_galleries/picasa_album_table_reader_unittest.cc

Issue 2321573002: //chrome misc: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix Win compilation Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 "chrome/utility/media_galleries/picasa_album_table_reader.h" 5 #include "chrome/utility/media_galleries/picasa_album_table_reader.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 std::vector<std::string> token_vector; 51 std::vector<std::string> token_vector;
52 token_vector.push_back(""); 52 token_vector.push_back("");
53 token_vector.push_back(""); 53 token_vector.push_back("");
54 token_vector.push_back(std::string(kAlbumTokenPrefix) + "uid3"); 54 token_vector.push_back(std::string(kAlbumTokenPrefix) + "uid3");
55 55
56 std::vector<std::string> uid_vector; 56 std::vector<std::string> uid_vector;
57 uid_vector.push_back("uid1"); 57 uid_vector.push_back("uid1");
58 uid_vector.push_back("uid2"); 58 uid_vector.push_back("uid2");
59 uid_vector.push_back("uid3"); 59 uid_vector.push_back("uid3");
60 60
61 WriteAlbumTable(temp_dir.path(), category_vector, date_vector, 61 WriteAlbumTable(temp_dir.GetPath(), category_vector, date_vector,
62 filename_vector, name_vector, token_vector, uid_vector); 62 filename_vector, name_vector, token_vector, uid_vector);
63 63
64 AlbumTableFiles album_table_files(temp_dir.path()); 64 AlbumTableFiles album_table_files(temp_dir.GetPath());
65 PicasaAlbumTableReader reader(std::move(album_table_files)); 65 PicasaAlbumTableReader reader(std::move(album_table_files));
66 66
67 ASSERT_TRUE(reader.Init()); 67 ASSERT_TRUE(reader.Init());
68 68
69 const std::vector<AlbumInfo>& albums = reader.albums(); 69 const std::vector<AlbumInfo>& albums = reader.albums();
70 const std::vector<AlbumInfo>& folders = reader.folders(); 70 const std::vector<AlbumInfo>& folders = reader.folders();
71 71
72 ASSERT_EQ(1u, albums.size()); 72 ASSERT_EQ(1u, albums.size());
73 ASSERT_EQ(1u, folders.size()); 73 ASSERT_EQ(1u, folders.size());
74 74
75 EXPECT_EQ(test_album_name, albums[0].name); 75 EXPECT_EQ(test_album_name, albums[0].name);
76 EXPECT_EQ(test_folder_name, folders[0].name); 76 EXPECT_EQ(test_folder_name, folders[0].name);
77 77
78 EXPECT_EQ(test_folder_path, folders[0].path); 78 EXPECT_EQ(test_folder_path, folders[0].path);
79 79
80 base::TimeDelta time_delta = albums[0].timestamp - folders[0].timestamp; 80 base::TimeDelta time_delta = albums[0].timestamp - folders[0].timestamp;
81 81
82 EXPECT_EQ(test_time_delta, time_delta.InDays()); 82 EXPECT_EQ(test_time_delta, time_delta.InDays());
83 } 83 }
84 84
85 } // namespace 85 } // namespace
86 86
87 } // namespace picasa 87 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/utility/importer/safari_importer_unittest.mm ('k') | chrome/utility/media_galleries/pmp_column_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698