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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/import_controller_unittest.js

Issue 914353004: Update import details panel to comply (mostly) with UX direction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** @type {!MockVolumeManager} */ 5 /** @type {!MockVolumeManager} */
6 var volumeManager; 6 var volumeManager;
7 7
8 /** @type {!TestMediaScanner} */ 8 /** @type {!TestMediaScanner} */
9 var mediaScanner; 9 var mediaScanner;
10 10
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 * Test implementation of importer.CommandWidget. 476 * Test implementation of importer.CommandWidget.
477 * 477 *
478 * @constructor 478 * @constructor
479 * @implements {importer.CommandWidget} 479 * @implements {importer.CommandWidget}
480 * @struct 480 * @struct
481 */ 481 */
482 importer.TestCommandWidget = function() { 482 importer.TestCommandWidget = function() {
483 /** @public {function()} */ 483 /** @public {function()} */
484 this.executeListener; 484 this.executeListener;
485 485
486 /** @public {function()} */
487 this.destinationListener;
488
486 /** @private {!importer.Resolver.<!importer.CommandUpdate>} */ 489 /** @private {!importer.Resolver.<!importer.CommandUpdate>} */
487 this.updateResolver_ = new importer.Resolver(); 490 this.updateResolver_ = new importer.Resolver();
488 491
489 /** @public {!importer.Resolver.<!importer.CommandUpdate>} */ 492 /** @public {!importer.Resolver.<!importer.CommandUpdate>} */
490 this.updatePromise = this.updateResolver_.promise; 493 this.updatePromise = this.updateResolver_.promise;
491 }; 494 };
492 495
493 /** Resets the widget */ 496 /** Resets the widget */
494 importer.TestCommandWidget.prototype.resetPromise = function() { 497 importer.TestCommandWidget.prototype.resetPromise = function() {
495 this.updateResolver_ = new importer.Resolver(); 498 this.updateResolver_ = new importer.Resolver();
496 this.updatePromise = this.updateResolver_.promise; 499 this.updatePromise = this.updateResolver_.promise;
497 }; 500 };
498 501
499 /** @override */ 502 /** @override */
500 importer.TestCommandWidget.prototype.addImportClickedListener = 503 importer.TestCommandWidget.prototype.addImportClickedListener =
501 function(listener) { 504 function(listener) {
502 this.executeListener = listener; 505 this.executeListener = listener;
503 }; 506 };
504 507
505 /** @override */ 508 /** @override */
509 importer.TestCommandWidget.prototype.addDestinationClickedListener =
510 function(listener) {
511 this.destinationListener = listener;
512 };
513
514 /** @override */
506 importer.TestCommandWidget.prototype.update = function(update) { 515 importer.TestCommandWidget.prototype.update = function(update) {
507 assertFalse(this.updateResolver_.settled, 'Should not have been settled.'); 516 assertFalse(this.updateResolver_.settled, 'Should not have been settled.');
508 this.updateResolver_.resolve(update); 517 this.updateResolver_.resolve(update);
509 }; 518 };
510 519
511 /** @override */ 520 /** @override */
512 importer.TestCommandWidget.prototype.updateDetails = function(scan) { 521 importer.TestCommandWidget.prototype.updateDetails = function(scan) {
513 // TODO(smckay) 522 // TODO(smckay)
514 }; 523 };
515 524
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 * @param {!Array.<string>} fileNames 568 * @param {!Array.<string>} fileNames
560 * @return {!VolumeInfo} 569 * @return {!VolumeInfo}
561 */ 570 */
562 function setupFileSystem(volumeType, volumeId, fileNames) { 571 function setupFileSystem(volumeType, volumeId, fileNames) {
563 var volumeInfo = volumeManager.createVolumeInfo( 572 var volumeInfo = volumeManager.createVolumeInfo(
564 volumeType, volumeId, 'A volume known as ' + volumeId); 573 volumeType, volumeId, 'A volume known as ' + volumeId);
565 assertTrue(volumeInfo != null); 574 assertTrue(volumeInfo != null);
566 volumeInfo.fileSystem.populate(fileNames); 575 volumeInfo.fileSystem.populate(fileNames);
567 return volumeInfo; 576 return volumeInfo;
568 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698