| Index: ui/file_manager/file_manager/background/js/media_import_handler_unittest.js
|
| diff --git a/ui/file_manager/file_manager/background/js/media_import_handler_unittest.js b/ui/file_manager/file_manager/background/js/media_import_handler_unittest.js
|
| index 173886534f5cd2097a4be1a92d9b191c6eee3824..767a69ccd3f0d874335b3af3485afa28ef010f9e 100644
|
| --- a/ui/file_manager/file_manager/background/js/media_import_handler_unittest.js
|
| +++ b/ui/file_manager/file_manager/background/js/media_import_handler_unittest.js
|
| @@ -81,7 +81,6 @@ function setUp() {
|
| mediaImporter = new importer.MediaImportHandler(
|
| progressCenter,
|
| importHistory,
|
| - duplicateFinderFactory,
|
| new TestTracker());
|
| }
|
|
|
| @@ -371,67 +370,6 @@ function testImportCancellation(callback) {
|
| scanResult.finalize();
|
| }
|
|
|
| -function testImportWithDuplicates(callback) {
|
| - var media = setupFileSystem([
|
| - '/DCIM/photos0/IMG00001.jpg',
|
| - '/DCIM/photos0/IMG00002.jpg',
|
| - '/DCIM/photos0/IMG00003.jpg',
|
| - '/DCIM/photos1/IMG00004.jpg',
|
| - '/DCIM/photos1/IMG00005.jpg',
|
| - '/DCIM/photos1/IMG00006.jpg'
|
| - ]);
|
| -
|
| - /** @const {number} */
|
| - var EXPECTED_COPY_COUNT = 3;
|
| -
|
| - var scanResult = new TestScanResult(media);
|
| - var importTask = mediaImporter.importFromScanResult(
|
| - scanResult,
|
| - importer.Destination.GOOGLE_DRIVE,
|
| - destinationFactory);
|
| - var whenImportDone = new Promise(
|
| - function(resolve, reject) {
|
| - importTask.addObserver(
|
| - /**
|
| - * @param {!importer.TaskQueue.UpdateType} updateType
|
| - * @param {!importer.TaskQueue.Task} task
|
| - */
|
| - function(updateType, task) {
|
| - switch (updateType) {
|
| - case importer.TaskQueue.UpdateType.COMPLETE:
|
| - resolve();
|
| - break;
|
| - case importer.TaskQueue.UpdateType.ERROR:
|
| - reject(new Error(importer.TaskQueue.UpdateType.ERROR));
|
| - break;
|
| - }
|
| - });
|
| - });
|
| -
|
| - // Simulate a known number of new imports followed by a bunch of duplicate
|
| - // imports.
|
| - var copyCount = 0;
|
| - importTask.addObserver(function(updateType) {
|
| - if (updateType ===
|
| - importer.MediaImportHandler.ImportTask.UpdateType.ENTRY_CHANGED) {
|
| - copyCount++;
|
| - if (copyCount === EXPECTED_COPY_COUNT) {
|
| - duplicateFinderFactory.instances[0].returnValue = true;
|
| - }
|
| - }
|
| - });
|
| -
|
| - reportPromise(
|
| - whenImportDone.then(
|
| - function() {
|
| - var copiedEntries = destinationFileSystem.root.getAllChildren();
|
| - assertEquals(EXPECTED_COPY_COUNT, copiedEntries.length);
|
| - }),
|
| - callback);
|
| -
|
| - scanResult.finalize();
|
| -}
|
| -
|
| function testImportWithErrors(callback) {
|
|
|
| // Quiet the logger just in this test where we expect errors.
|
|
|