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

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

Issue 809803006: Gallery: Add debugMe method to Gallery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/mosaic_mode_unittest.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/mosaic_mode_unittest.js
diff --git a/ui/file_manager/gallery/js/mosaic_mode_unittest.js b/ui/file_manager/gallery/js/mosaic_mode_unittest.js
new file mode 100644
index 0000000000000000000000000000000000000000..4d0676f5461baecdbb2176f27e8117cc9eedfc79
--- /dev/null
+++ b/ui/file_manager/gallery/js/mosaic_mode_unittest.js
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Mocking load detached image function.
+ThumbnailLoader.prototype.loadDetachedImage = function(call) {
+ call(true);
+};
+
+function testBasic() {
+ var fileSystem = new MockFileSystem('volumeId');
+ var entry = new MockEntry(fileSystem, '/test.jpg');
+ var item = new Gallery.Item(entry, {}, {}, {}, true);
+ var model = new cr.ui.ArrayDataModel([item]);
+ var selection = new cr.ui.ListSelectionModel();
+ var mosaic = new Mosaic(
+ document, null, model, selection, {getLocationInfo: function() {}});
+ document.documentElement.appendChild(mosaic);
+ mosaic.init();
+ mosaic.layout();
+ assertEquals(1, mosaic.querySelectorAll('.mosaic-tile').length);
+ assertEquals(1, mosaic.querySelectorAll(
+ '.mosaic-tile .load-target-file-entry').length);
+}
« no previous file with comments | « ui/file_manager/gallery/js/mosaic_mode_unittest.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698