OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/safe_numerics.h" | 10 #include "base/safe_numerics.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 MediaGalleryPrefInfo gallery_info; | 152 MediaGalleryPrefInfo gallery_info; |
153 ASSERT_FALSE(preferences->LookUpGalleryByPath(fake_gallery_temp_dir_.path(), | 153 ASSERT_FALSE(preferences->LookUpGalleryByPath(fake_gallery_temp_dir_.path(), |
154 &gallery_info)); | 154 &gallery_info)); |
155 preferences->AddGallery(gallery_info.device_id, | 155 preferences->AddGallery(gallery_info.device_id, |
156 gallery_info.path, | 156 gallery_info.path, |
157 MediaGalleryPrefInfo::kAutoDetected, | 157 MediaGalleryPrefInfo::kAutoDetected, |
158 gallery_info.volume_label, | 158 gallery_info.volume_label, |
159 gallery_info.vendor_name, | 159 gallery_info.vendor_name, |
160 gallery_info.model_name, | 160 gallery_info.model_name, |
161 gallery_info.total_size_in_bytes, | 161 gallery_info.total_size_in_bytes, |
162 gallery_info.last_attach_time); | 162 gallery_info.last_attach_time, |
| 163 0, 0, 0); |
163 | 164 |
164 content::RunAllPendingInMessageLoop(); | 165 content::RunAllPendingInMessageLoop(); |
165 | 166 |
166 base::FilePath test_data_path(GetCommonDataDir()); | 167 base::FilePath test_data_path(GetCommonDataDir()); |
167 base::FilePath write_path = fake_gallery_temp_dir_.path(); | 168 base::FilePath write_path = fake_gallery_temp_dir_.path(); |
168 | 169 |
169 // Valid file, should show up in JS as a FileEntry. | 170 // Valid file, should show up in JS as a FileEntry. |
170 ASSERT_TRUE(base::CopyFile(test_data_path.AppendASCII("test.jpg"), | 171 ASSERT_TRUE(base::CopyFile(test_data_path.AppendASCII("test.jpg"), |
171 write_path.AppendASCII("test.jpg"))); | 172 write_path.AppendASCII("test.jpg"))); |
172 | 173 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 PopulateIPhotoTestData( | 439 PopulateIPhotoTestData( |
439 ensure_media_directories_exists()->GetFakeIPhotoRootPath()); | 440 ensure_media_directories_exists()->GetFakeIPhotoRootPath()); |
440 | 441 |
441 base::ListValue custom_args; | 442 base::ListValue custom_args; |
442 custom_args.AppendInteger(test_jpg_size()); | 443 custom_args.AppendInteger(test_jpg_size()); |
443 ASSERT_TRUE(RunMediaGalleriesTestWithArg("iphoto", custom_args)) << message_; | 444 ASSERT_TRUE(RunMediaGalleriesTestWithArg("iphoto", custom_args)) << message_; |
444 | 445 |
445 iapps::SetMacPreferencesForTesting(NULL); | 446 iapps::SetMacPreferencesForTesting(NULL); |
446 } | 447 } |
447 #endif // defined(OS_MACOSX) | 448 #endif // defined(OS_MACOSX) |
OLD | NEW |