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

Unified Diff: ui/file_manager/gallery/js/gallery_data_model_unittest.js

Issue 853653004: Gallery: Add items to GalleryDataModel before loading their metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/gallery_data_model.js ('k') | ui/file_manager/gallery/js/gallery_item.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery_data_model_unittest.js
diff --git a/ui/file_manager/gallery/js/gallery_data_model_unittest.js b/ui/file_manager/gallery/js/gallery_data_model_unittest.js
index c54ce2d0c9edd3d93a2b154ab8b8c8b9067e4864..1d015e16ac3dc1cbacc4f83d3cfb1ba813c81081 100644
--- a/ui/file_manager/gallery/js/gallery_data_model_unittest.js
+++ b/ui/file_manager/gallery/js/gallery_data_model_unittest.js
@@ -7,9 +7,25 @@ var model;
var fileSystem;
var item;
+/**
+ * Mock thumbnail model.
+ */
+function ThumbnailModel() {
+}
+
+ThumbnailModel.prototype.get = function(entries) {
+ return Promise.resolve(entries.map(function() {
+ return {};
+ }));
+};
+
function setUp() {
model = new GalleryDataModel(
- /* Mock MetadataModel */{},
+ /* Mock MetadataModel */{
+ get: function() {
+ return Promise.resolve([{}]);
+ }
+ },
/* Mock EntryListWatcher */{});
fileSystem = new MockFileSystem('volumeId');
item = new Gallery.Item(
« no previous file with comments | « ui/file_manager/gallery/js/gallery_data_model.js ('k') | ui/file_manager/gallery/js/gallery_item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698