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

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

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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"
6
5 #include <stdint.h> 7 #include <stdint.h>
6 8
9 #include <utility>
10
7 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
8 #include "chrome/common/media_galleries/picasa_test_util.h" 12 #include "chrome/common/media_galleries/picasa_test_util.h"
9 #include "chrome/common/media_galleries/pmp_constants.h" 13 #include "chrome/common/media_galleries/pmp_constants.h"
10 #include "chrome/utility/media_galleries/picasa_album_table_reader.h"
11 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
12 15
13 namespace picasa { 16 namespace picasa {
14 17
15 namespace { 18 namespace {
16 19
17 TEST(PicasaAlbumTableReaderTest, FoldersAndAlbums) { 20 TEST(PicasaAlbumTableReaderTest, FoldersAndAlbums) {
18 base::ScopedTempDir temp_dir; 21 base::ScopedTempDir temp_dir;
19 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 22 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
20 23
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 55
53 std::vector<std::string> uid_vector; 56 std::vector<std::string> uid_vector;
54 uid_vector.push_back("uid1"); 57 uid_vector.push_back("uid1");
55 uid_vector.push_back("uid2"); 58 uid_vector.push_back("uid2");
56 uid_vector.push_back("uid3"); 59 uid_vector.push_back("uid3");
57 60
58 WriteAlbumTable(temp_dir.path(), category_vector, date_vector, 61 WriteAlbumTable(temp_dir.path(), category_vector, date_vector,
59 filename_vector, name_vector, token_vector, uid_vector); 62 filename_vector, name_vector, token_vector, uid_vector);
60 63
61 AlbumTableFiles album_table_files(temp_dir.path()); 64 AlbumTableFiles album_table_files(temp_dir.path());
62 PicasaAlbumTableReader reader(album_table_files.Pass()); 65 PicasaAlbumTableReader reader(std::move(album_table_files));
63 66
64 ASSERT_TRUE(reader.Init()); 67 ASSERT_TRUE(reader.Init());
65 68
66 const std::vector<AlbumInfo>& albums = reader.albums(); 69 const std::vector<AlbumInfo>& albums = reader.albums();
67 const std::vector<AlbumInfo>& folders = reader.folders(); 70 const std::vector<AlbumInfo>& folders = reader.folders();
68 71
69 ASSERT_EQ(1u, albums.size()); 72 ASSERT_EQ(1u, albums.size());
70 ASSERT_EQ(1u, folders.size()); 73 ASSERT_EQ(1u, folders.size());
71 74
72 EXPECT_EQ(test_album_name, albums[0].name); 75 EXPECT_EQ(test_album_name, albums[0].name);
73 EXPECT_EQ(test_folder_name, folders[0].name); 76 EXPECT_EQ(test_folder_name, folders[0].name);
74 77
75 EXPECT_EQ(test_folder_path, folders[0].path); 78 EXPECT_EQ(test_folder_path, folders[0].path);
76 79
77 base::TimeDelta time_delta = albums[0].timestamp - folders[0].timestamp; 80 base::TimeDelta time_delta = albums[0].timestamp - folders[0].timestamp;
78 81
79 EXPECT_EQ(test_time_delta, time_delta.InDays()); 82 EXPECT_EQ(test_time_delta, time_delta.InDays());
80 } 83 }
81 84
82 } // namespace 85 } // namespace
83 86
84 } // namespace picasa 87 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/utility/media_galleries/picasa_album_table_reader.cc ('k') | chrome/utility/safe_browsing/mac/dmg_iterator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698