• Luciano Pacheco's avatar
    Fix crostini DirectoryItem type when using My Files · f129fcdb
    Luciano Pacheco authored
    DirectoryItem created without a specific NavigationModelItem defaults
    to SubDirectoryItem. Change DirectoryItem to check if entry has a
    NavigationModelItem to generate the appropriate derived "item" type
    from DirectoryItem. In particular, crostini will generate FakeItem.
    This fixes issue where crostini wouldn't mount because the trigger
    to mount is on FakeItem.
    
    Change FakeItem to have updateSharedStatusIcon as no-op, since it
    doesn't have a shared state. This fixes an error where DirectoryItem
    calls updateSharedStatusIcon on its sub-items, before FakeItem was
    used only as top-level so nobody was calling updateSharedStatusIcon.
    
    Change DirectoryTree to call EntryList to update its sub-directories
    since those sub-directories are usually volumes that need to update
    themselves.
    
    Add test createFolderNestedDownloads to check that EntryListItem call
    to updateSubDirectories doesn't have to be recursive.
    
    Change SubDirectoryItem to add "volume-type-for-testing" in test to
    fix tests using this selector when running with My Files enabled if
    the item is a volume.
    
    Bug: 857335
    Cq-Include-Trybots: luci.chromium.try:closure_compilation
    Change-Id: I8a579b9c754143d9ba8322aba9014e82a3ac1757
    Reviewed-on: https://chromium-review.googlesource.com/1133616
    Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
    Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#574811}
    f129fcdb
file_manager_browsertest.cc 27.2 KB