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

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

Issue 663513003: Add an unittest for background/volume_manager.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed variables. Created 6 years, 2 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/volume_manager.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager.js b/ui/file_manager/file_manager/background/js/volume_manager.js
index 9e3f2aa35858077f0d35b45f0ee2d6aa27dfb91d..695e87c16880fb8489f7d43e5350c93971e6216b 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager.js
@@ -503,13 +503,6 @@ VolumeManager.prototype.__proto__ = cr.EventTarget.prototype;
VolumeManager.TIMEOUT = 15 * 60 * 1000;
/**
- * Queue to run getInstance sequentially.
- * @type {AsyncUtil.Queue}
- * @private
- */
-VolumeManager.getInstanceQueue_ = new AsyncUtil.Queue();
-
-/**
* The singleton instance of VolumeManager. Initialized by the first invocation
* of getInstance().
* @type {VolumeManager}
@@ -555,6 +548,14 @@ VolumeManager.getInstance = function(opt_callback) {
};
/**
+ * Revokes the singleton instance for testing.
+ */
+VolumeManager.revokeInstanceForTesting = function() {
+ VolumeManager.instancePromise_ = null;
+ VolumeManager.instance_ = null;
+}
+
+/**
* Initializes mount points.
* @param {function()} callback Called upon the completion of the
* initialization.

Powered by Google App Engine
This is Rietveld 408576698