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

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: Reorg/rename metrics events. Fix a metrics loading bug. 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 225c35fe51bd0f137656e19a9392eb68268162d2..df7cccd8c8154c09b9a3038ce7aad242c70fcb93 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;
/** @type {!Promise<!DirectoryEntry>} */
var destinationFactory;
@@ -65,10 +65,13 @@ function setUp() {
function(directory) {
return directory;
});
- duplicateFinder = new importer.TestDuplicateFinder();
+ duplicateFinderFactory = new importer.TestDuplicateFinder.Factory();
mediaImporter = new importer.MediaImportHandler(
- progressCenter, importHistory, duplicateFinder);
+ progressCenter,
+ importHistory,
+ duplicateFinderFactory,
+ new TestTracker());
}
function testImportMedia(callback) {
@@ -262,7 +265,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