Chromium Code Reviews| Index: ui/file_manager/file_manager/background/js/mock_volume_manager.js |
| diff --git a/ui/file_manager/file_manager/background/js/mock_volume_manager.js b/ui/file_manager/file_manager/background/js/mock_volume_manager.js |
| index 04882df4fc6d556bc29de9b812d1e2cd7fbefb14..d7d53d2748b75154dbd0c696e7b6323c2afc7cba 100644 |
| --- a/ui/file_manager/file_manager/background/js/mock_volume_manager.js |
| +++ b/ui/file_manager/file_manager/background/js/mock_volume_manager.js |
| @@ -74,15 +74,29 @@ MockVolumeManager.prototype.getVolumeInfo = function(entry) { |
| */ |
| MockVolumeManager.prototype.getLocationInfo = function(entry) { |
| if (util.isFakeEntry(entry)) { |
| - return new EntryLocationImpl(this.volumeInfoList.item(0), entry.rootType, |
| - true, true); |
| + return new EntryLocationImpl( |
| + this.volumeInfoList.item(0), entry.rootType, |
| + VolumeManagerCommon.EntryType.FAKE_ENTRY, true, true); |
| } |
| if (entry.filesystem.name === VolumeManagerCommon.VolumeType.DRIVE) { |
| var volumeInfo = this.volumeInfoList.item(0); |
| var isRootEntry = entry.fullPath === '/root'; |
| - return new EntryLocationImpl(volumeInfo, VolumeManagerCommon.RootType.DRIVE, |
| - isRootEntry, true); |
| + var entryType; |
| + var roootType; |
| + if (entry.fullPath === '/team_drives') { |
| + rootType = VolumeManagerCommon.RootType.TEAM_DRIVES; |
| + entryType = VolumeManagerCommon.EntryType.TEAM_DRIVES_GRAND_ROOT; |
| + } else if (util.isTeamDriveRoot(entry)) { |
| + rootType = VolumeManagerCommon.RootType.TEAM_DRIVES; |
| + entryType = VolumeManagerCommon.EntryType.TEAM_DRIVE_ROOT; |
| + } else { |
| + rootType = VolumeManagerCommon.RootType.DRIVE; |
| + entryType = isRootEntry ? VolumeManagerCommon.EntryType.VOLUME_ROOT : |
| + VolumeManagerCommon.EntryType.OTHER; |
| + } |
| + return new EntryLocationImpl( |
| + volumeInfo, rootType, entryType, isRootEntry, true); |
| } |
| throw new Error('Not implemented exception.'); |
| @@ -208,15 +222,30 @@ MockVolumeManagerWrapper.prototype.getVolumeInfo = function(entry) { |
| */ |
| MockVolumeManagerWrapper.prototype.getLocationInfo = function(entry) { |
| if (util.isFakeEntry(entry)) { |
| - return new EntryLocationImpl(this.volumeInfoList.item(0), entry.rootType, |
| - true, true); |
| + return new EntryLocationImpl( |
| + this.volumeInfoList.item(0), entry.rootType, |
| + VolumeManagerCommon.EntryType.FAKE_ENTRY, true, true); |
| } |
| if (entry.filesystem.name === VolumeManagerCommon.VolumeType.DRIVE) { |
| var volumeInfo = this.volumeInfoList.item(0); |
| var isRootEntry = entry.fullPath === '/root'; |
| - return new EntryLocationImpl(volumeInfo, VolumeManagerCommon.RootType.DRIVE, |
| - isRootEntry, true); |
| + var entryType; |
| + var roootType; |
| + if (entry.fullPath === '/team_drives') { |
| + rootType = VolumeManagerCommon.RootType.TEAM_DRIVES; |
| + entryType = VolumeManagerCommon.EntryType.TEAM_DRIVES_GRAND_ROOT; |
| + } else if (util.isTeamDriveRoot(entry)) { |
| + rootType = VolumeManagerCommon.RootType.TEAM_DRIVES; |
| + entryType = VolumeManagerCommon.EntryType.TEAM_DRIVE_ROOT; |
| + } else { |
| + rootType = VolumeManagerCommon.RootType.DRIVE; |
| + entryType = isRootEntry ? VolumeManagerCommon.EntryType.VOLUME_ROOT : |
| + VolumeManagerCommon.EntryType.OTHER; |
| + } |
| + return new EntryLocationImpl( |
| + volumeInfo, rootType, entryType, isRootEntry, true); |
| } |
| + |
|
fukino
2017/04/27 10:44:57
blank line is added unintentionally?
yamaguchi
2017/04/28 11:12:15
Reverted.
|
| throw new Error('Not implemented exception.'); |
| }; |
| /** |