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

Unified Diff: ui/file_manager/file_manager/background/js/media_import_handler_unittest.js

Issue 918713003: Files.app: Add analytics code to instrument cloud import flows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback. 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/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 7d0747f0cf36a6adc4d930b4f2e9e4853b394df7..f58e91e774423943b1eab17035f1017b8911ac96 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
@@ -23,8 +23,8 @@ var mockCopier;
/** @type {!MockFileSystem} */
var destinationFileSystem;
-/** @type {!importer.DuplicateFinder} */
-var duplicateFinder;
+/** @type {!importer.TestDuplicateFinder.Factory} */
+var duplicateFinderFactory;
// Set up string assets.
loadTimeData.data = {
@@ -55,10 +55,13 @@ function setUp() {
importHistory = new importer.TestImportHistory();
mediaScanner = new TestMediaScanner();
destinationFileSystem = new MockFileSystem(destinationFactory);
- duplicateFinder = new importer.TestDuplicateFinder();
+ duplicateFinderFactory = new importer.TestDuplicateFinder.Factory();
mediaImporter = new importer.MediaImportHandler(
- progressCenter, importHistory, duplicateFinder);
+ progressCenter,
+ importHistory,
+ duplicateFinderFactory,
+ new TestTracker());
}
function testImportMedia(callback) {
@@ -252,7 +255,7 @@ function testImportWithDuplicates(callback) {
importer.MediaImportHandler.ImportTask.UpdateType.ENTRY_CHANGED) {
copyCount++;
if (copyCount === EXPECTED_COPY_COUNT) {
- duplicateFinder.returnValue = true;
+ duplicateFinderFactory.instances[0].returnValue = true;
}
}
});

Powered by Google App Engine
This is Rietveld 408576698