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

Unified Diff: ui/file_manager/file_manager/foreground/js/navigation_list_model_unittest.js

Issue 1134213006: Hide the "Add new services" menu from Files app when running as dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 7 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/foreground/js/navigation_list_model.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/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);
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/navigation_list_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698