| Index: ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js b/ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js
|
| index 4a6946a1d161383d304e9ef30b9f5300bd3ae439..98709a7ce64fcbb386fcd36e70b8177b2c009b61 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js
|
| @@ -44,31 +44,31 @@ function testAddAndRemoveShortcuts() {
|
| var volumeManager = new MockVolumeManagerWrapper();
|
| var shortcutListModel = new MockFolderShortcutDataModel(
|
| [new MockFileEntry(drive, '/root/shortcut')]);
|
| - var model = new NavigationListModel(volumeManager, shortcutListModel);
|
| + var model = new NavigationListModel(volumeManager, shortcutListModel, null);
|
|
|
| - assertEquals(4, model.length);
|
| + assertEquals(3, model.length);
|
|
|
| // Add a shortcut at the tail.
|
| shortcutListModel.splice(1, 0, new MockFileEntry(drive, '/root/shortcut2'));
|
| - assertEquals(5, model.length);
|
| + assertEquals(4, model.length);
|
| assertEquals('/root/shortcut2', model.item(3).entry.fullPath);
|
|
|
| // Add a shortcut at the head.
|
| shortcutListModel.splice(0, 0, new MockFileEntry(drive, '/root/hoge'));
|
| - assertEquals(6, model.length);
|
| + assertEquals(5, model.length);
|
| assertEquals('/root/hoge', model.item(2).entry.fullPath);
|
| assertEquals('/root/shortcut', model.item(3).entry.fullPath);
|
| assertEquals('/root/shortcut2', model.item(4).entry.fullPath);
|
|
|
| // Remove the last shortcut.
|
| shortcutListModel.splice(2, 1);
|
| - assertEquals(5, model.length);
|
| + assertEquals(4, model.length);
|
| assertEquals('/root/hoge', model.item(2).entry.fullPath);
|
| assertEquals('/root/shortcut', model.item(3).entry.fullPath);
|
|
|
| // Remove the first shortcut.
|
| shortcutListModel.splice(0, 1);
|
| - assertEquals(4, model.length);
|
| + assertEquals(3, model.length);
|
| assertEquals('/root/shortcut', model.item(2).entry.fullPath);
|
| }
|
|
|
| @@ -76,15 +76,15 @@ function testAddAndRemoveVolumes() {
|
| var volumeManager = new MockVolumeManagerWrapper();
|
| var shortcutListModel = new MockFolderShortcutDataModel(
|
| [new MockFileEntry(drive, '/root/shortcut')]);
|
| - var model = new NavigationListModel(volumeManager, shortcutListModel);
|
| + var model = new NavigationListModel(volumeManager, shortcutListModel, null);
|
|
|
| - assertEquals(4, model.length);
|
| + assertEquals(3, model.length);
|
|
|
| // Removable volume 'hoge' is mounted.
|
| volumeManager.volumeInfoList.push(
|
| MockVolumeManagerWrapper.createMockVolumeInfo(
|
| VolumeManagerCommon.VolumeType.REMOVABLE, 'removable:hoge'));
|
| - assertEquals(5, model.length);
|
| + assertEquals(4, model.length);
|
| assertEquals('drive', model.item(0).volumeInfo.volumeId);
|
| assertEquals('downloads', model.item(1).volumeInfo.volumeId);
|
| assertEquals('removable:hoge', model.item(2).volumeInfo.volumeId);
|
| @@ -94,7 +94,7 @@ function testAddAndRemoveVolumes() {
|
| volumeManager.volumeInfoList.push(
|
| MockVolumeManagerWrapper.createMockVolumeInfo(
|
| VolumeManagerCommon.VolumeType.REMOVABLE, 'removable:fuga'));
|
| - assertEquals(6, model.length);
|
| + assertEquals(5, model.length);
|
| assertEquals('drive', model.item(0).volumeInfo.volumeId);
|
| assertEquals('downloads', model.item(1).volumeInfo.volumeId);
|
| assertEquals('removable:hoge', model.item(2).volumeInfo.volumeId);
|
| @@ -104,7 +104,7 @@ function testAddAndRemoveVolumes() {
|
| // A shortcut is created on the 'hoge' volume.
|
| shortcutListModel.splice(
|
| 1, 0, new MockFileEntry(hoge, '/shortcut2'));
|
| - assertEquals(7, model.length);
|
| + assertEquals(6, model.length);
|
| assertEquals('drive', model.item(0).volumeInfo.volumeId);
|
| assertEquals('downloads', model.item(1).volumeInfo.volumeId);
|
| assertEquals('removable:hoge', model.item(2).volumeInfo.volumeId);
|
|
|