| Index: chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js
|
| diff --git a/chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js b/chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js
|
| index f47dec2e4ec1354da9e209d557e2a695b66f4f26..eeac5566cca8c7ddb5210707e36262e5e3cde8fc 100644
|
| --- a/chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js
|
| +++ b/chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js
|
| @@ -18,6 +18,23 @@ function MockVolumeManager() {
|
| }
|
|
|
| /**
|
| + * @private {?VolumeManager}
|
| + */
|
| +MockVolumeManager.instance_ = null;
|
| +
|
| +/**
|
| + * Replaces the VolumeManager singleton with a MockVolumeManager.
|
| + * @param {!MockVolumeManager=} opt_singleton
|
| + */
|
| +MockVolumeManager.installMockSingleton = function(opt_singleton) {
|
| + MockVolumeManager.instance_ = opt_singleton || new MockVolumeManager();
|
| +
|
| + VolumeManager.getInstance = function() {
|
| + return Promise.resolve(MockVolumeManager.instance_);
|
| + };
|
| +};
|
| +
|
| +/**
|
| * Returns the corresponding VolumeInfo.
|
| *
|
| * @param {MockFileEntry} entry MockFileEntry pointing anywhere on a volume.
|
| @@ -55,6 +72,15 @@ MockVolumeManager.prototype.getLocationInfo = function(entry) {
|
| };
|
|
|
| /**
|
| + * @param {VolumeManagerCommon.VolumeType} volumeType Volume type.
|
| + * @return {VolumeInfo} Volume info.
|
| + */
|
| +MockVolumeManager.prototype.getCurrentProfileVolumeInfo = function(volumeType) {
|
| + return VolumeManager.prototype.getCurrentProfileVolumeInfo.call(
|
| + this, volumeType);
|
| +};
|
| +
|
| +/**
|
| * Utility function to create a mock VolumeInfo.
|
| * @param {VolumeType} type Volume type.
|
| * @param {string} volumeId Volume id.
|
|
|