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

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

Issue 893913003: Files.app: Fix closure compiler error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 5 years, 11 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
« no previous file with comments | « ui/file_manager/file_manager/background/js/volume_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/volume_manager_unittest.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_unittest.js b/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
index 4ad0897285c3cc84accdefb12fca1c9cabda2ab0..d7e97b7a700eaeab23b0d3bd4784c8d058453273 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
@@ -213,7 +213,7 @@ function testGetLocationInfo(callback) {
'/foo/bar/bla.zip');
var downloadLocationInfo = volumeManager.getLocationInfo(downloadEntry);
assertEquals(VolumeManagerCommon.VolumeType.DOWNLOADS,
- downloadLocationInfo.rootType)
+ downloadLocationInfo.rootType);
assertFalse(downloadLocationInfo.isReadOnly);
assertFalse(downloadLocationInfo.isRootEntry);
@@ -222,8 +222,32 @@ function testGetLocationInfo(callback) {
'/root');
var driveLocationInfo = volumeManager.getLocationInfo(driveEntry);
assertEquals(VolumeManagerCommon.VolumeType.DRIVE,
- driveLocationInfo.rootType)
+ driveLocationInfo.rootType);
assertFalse(driveLocationInfo.isReadOnly);
assertTrue(driveLocationInfo.isRootEntry);
}), callback);
}
+
+function testVolumeInfoListWhenReady(callback) {
+ var list = new VolumeInfoList();
+ var promiseBeforeAdd = list.whenVolumeInfoReady('volumeId');
+ var volumeInfo = new VolumeInfo(
+ /* volumeType */ null,
+ 'volumeId',
+ /* fileSystem */ null,
+ /* error */ null,
+ /* deviceType */ null,
+ /* devicePath */ null,
+ /* isReadOnly */ false,
+ /* profile */ {},
+ /* label */ null,
+ /* extensionid */ null,
+ /* hasMedia */ false);
+ list.add(volumeInfo);
+ var promiseAfterAdd = list.whenVolumeInfoReady('volumeId');
+ reportPromise(Promise.all([promiseBeforeAdd, promiseAfterAdd]).then(
+ function(volumes) {
+ assertEquals(volumeInfo, volumes[0]);
+ assertEquals(volumeInfo, volumes[1]);
+ }), callback);
+}
« no previous file with comments | « ui/file_manager/file_manager/background/js/volume_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698