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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/preview_panel_unittest.js

Issue 900743002: Move preview panel's components to toolbar and footer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO comment about customized CommandButton. Created 5 years, 10 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
Index: ui/file_manager/file_manager/foreground/js/ui/preview_panel_unittest.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/preview_panel_unittest.js b/ui/file_manager/file_manager/foreground/js/ui/preview_panel_unittest.js
deleted file mode 100644
index f3e8a1c712eb221254d46b8ca7fecaa0f904e72e..0000000000000000000000000000000000000000
--- a/ui/file_manager/file_manager/foreground/js/ui/preview_panel_unittest.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-/**
- * Mock ThumbnailLoader.FillMode
- */
-var ThumbnailLoader = {
- FillMode: {
- }
-};
-
-/**
- * Mock FileGrid.
- */
-var FileGrid = {
- ThumbnailQuality: {},
- decorateThumbnailBox: function(
- box,
- entry,
- metadataCache,
- volumeManager,
- historyLoader,
- fillMode,
- quality,
- animation,
- opt_callback) {
- var imageContainer = document.createElement('div');
- imageContainer.classList.add('img-container');
- box.appendChild(imageContainer);
- var image = new Image();
- image.width = 500;
- image.height = 500;
- if (opt_callback)
- opt_callback(image);
- }
-};
-
-function testPreviewThumbnail() {
- var element = document.createElement('div');
- var mockFileSystem = new MockFileSystem('volumeId');
- var mockEntry = new MockFileEntry(mockFileSystem, '/test.jpg');
- var thumbnailUI = new PreviewPanel.Thumbnails(element);
- thumbnailUI.selection = {entries: [mockEntry]};
- thumbnailUI.selection = {entries: [mockEntry]};
- // Multiple updates of selection do not create multiple popup images.
- assertEquals(1, element.querySelectorAll('.popup').length);
-}

Powered by Google App Engine
This is Rietveld 408576698