Commit 32554396 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Add division line for MyFiles on directory tree

Division line got lost when we enabled MyFilesVolume flag which made
MyFiles to have the default section. The division line is displayed when
a new section starts in the directory tree.

Change the test that checks for section to run with the flag enabled,
code used when flag is disabled will be removed soon after M77 branch.

Bug: 985415
Change-Id: I50957703426579b4203c47b88ac57f6b6c16dacd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1709313
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Commit-Queue: Austin Tankiang <austinct@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarAustin Tankiang <austinct@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678937}
parent d93e70d9
...@@ -582,6 +582,7 @@ class NavigationListModel extends cr.EventTarget { ...@@ -582,6 +582,7 @@ class NavigationListModel extends cr.EventTarget {
myFilesModel = new NavigationModelFakeItem( myFilesModel = new NavigationModelFakeItem(
str('MY_FILES_ROOT_LABEL'), NavigationModelItemType.ENTRY_LIST, str('MY_FILES_ROOT_LABEL'), NavigationModelItemType.ENTRY_LIST,
myFilesEntry); myFilesEntry);
myFilesModel.section = NavigationSection.MY_FILES;
this.myFilesModel_ = myFilesModel; this.myFilesModel_ = myFilesModel;
} else { } else {
// When MyFilesVolume isn't available we create a empty EntryList to // When MyFilesVolume isn't available we create a empty EntryList to
...@@ -593,6 +594,7 @@ class NavigationListModel extends cr.EventTarget { ...@@ -593,6 +594,7 @@ class NavigationListModel extends cr.EventTarget {
myFilesModel = new NavigationModelFakeItem( myFilesModel = new NavigationModelFakeItem(
myFilesEntry.label, NavigationModelItemType.ENTRY_LIST, myFilesEntry.label, NavigationModelItemType.ENTRY_LIST,
myFilesEntry); myFilesEntry);
myFilesModel.section = NavigationSection.MY_FILES;
} }
} else { } else {
// Here is the initial version for MyFiles, which is only an entry in JS // Here is the initial version for MyFiles, which is only an entry in JS
......
...@@ -285,6 +285,9 @@ function testAddAndRemoveVolumes() { ...@@ -285,6 +285,9 @@ function testAddAndRemoveVolumes() {
* 3. keeps MTP/Archive/Removable volumes on the original order. * 3. keeps MTP/Archive/Removable volumes on the original order.
*/ */
function testOrderAndNestItems() { function testOrderAndNestItems() {
// Enable My files.
loadTimeData.data_['MY_FILES_VOLUME_ENABLED'] = true;
const volumeManager = new MockVolumeManager(); const volumeManager = new MockVolumeManager();
const shortcutListModel = new MockFolderShortcutDataModel([ const shortcutListModel = new MockFolderShortcutDataModel([
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment