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

Side by Side Diff: ui/file_manager/gallery/js/gallery_data_model_unittest.js

Issue 971723002: Files.app: Rename FileSystemMetadata with MetadataModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 5
6 var model; 6 var model;
7 var fileSystem; 7 var fileSystem;
8 var item; 8 var item;
9 9
10 function setUp() { 10 function setUp() {
11 var metadataCache = new MockMetadataCache(); 11 var metadataCache = new MockMetadataCache();
12 model = new GalleryDataModel( 12 model = new GalleryDataModel(
13 metadataCache, 13 metadataCache,
14 /* Mock FileSystemMetadata */{}, 14 /* Mock MetadataModel */{},
15 /* Mock EntryListWatcher */{}); 15 /* Mock EntryListWatcher */{});
16 fileSystem = new MockFileSystem('volumeId'); 16 fileSystem = new MockFileSystem('volumeId');
17 item = new Gallery.Item( 17 item = new Gallery.Item(
18 new MockEntry(fileSystem, '/test.jpg'), 18 new MockEntry(fileSystem, '/test.jpg'),
19 null, 19 null,
20 {media: {mimeType: 'image/jpeg'}}, 20 {media: {mimeType: 'image/jpeg'}},
21 metadataCache, 21 metadataCache,
22 /* original */ true); 22 /* original */ true);
23 } 23 }
24 24
(...skipping 27 matching lines...) Expand all
52 // Gallery item track new file. 52 // Gallery item track new file.
53 this.entry_ = new MockEntry(fileSystem, '/test (1).jpg'); 53 this.entry_ = new MockEntry(fileSystem, '/test (1).jpg');
54 callback(true); 54 callback(true);
55 }; 55 };
56 model.push(item); 56 model.push(item);
57 reportPromise( 57 reportPromise(
58 model.saveItem({}, item, document.createElement('canvas'), false). 58 model.saveItem({}, item, document.createElement('canvas'), false).
59 then(function() { assertEquals(2, model.length); }), 59 then(function() { assertEquals(2, model.length); }),
60 callback); 60 callback);
61 } 61 }
OLDNEW
« 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