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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc

Issue 140033003: Media galleries preferences also needs to track file counts for scan results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more call site Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/media_galleries/media_file_system_registry_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media_galleries/media_file_system_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698