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
3 // found in the LICENSE file.
5 // Mocking load detached image function.
6 ThumbnailLoader
.prototype.loadDetachedImage = function(call
) {
10 function testBasic() {
11 var fileSystem
= new MockFileSystem('volumeId');
12 var entry
= new MockEntry(fileSystem
, '/test.jpg');
13 var item
= new Gallery
.Item(entry
, {}, {}, {}, true);
14 var model
= new cr
.ui
.ArrayDataModel([item
]);
15 var selection
= new cr
.ui
.ListSelectionModel();
16 var mosaic
= new Mosaic(
17 document
, null, model
, selection
, {getLocationInfo: function() {}});
18 document
.documentElement
.appendChild(mosaic
);
21 assertEquals(1, mosaic
.querySelectorAll('.mosaic-tile').length
);
22 assertEquals(1, mosaic
.querySelectorAll(
23 '.mosaic-tile .load-target-file-entry').length
);