Index: chrome/test/data/webui/md_bookmarks/command_manager_test.js |
diff --git a/chrome/test/data/webui/md_bookmarks/command_manager_test.js b/chrome/test/data/webui/md_bookmarks/command_manager_test.js |
index 61ff0f85b6a41da3ce75ab74c125d3868860b67b..b5f04957d145908c3f81baf2eff54f969a69009a 100644 |
--- a/chrome/test/data/webui/md_bookmarks/command_manager_test.js |
+++ b/chrome/test/data/webui/md_bookmarks/command_manager_test.js |
@@ -164,6 +164,26 @@ suite('<bookmarks-command-manager>', function() { |
commandManager.assertLastCommand('redo'); |
}); |
+ test('Show In Folder is only available during search', function() { |
+ assertFalse( |
+ commandManager.canExecute(Command.SHOW_IN_FOLDER, new Set(['12']))); |
+ |
+ store.data.search.term = 'test'; |
+ store.data.search.results = ['12', '13']; |
+ store.notifyObservers(); |
+ |
+ assertTrue( |
+ commandManager.canExecute(Command.SHOW_IN_FOLDER, new Set(['12']))); |
+ assertFalse( |
+ commandManager.canExecute(Command.SHOW_IN_FOLDER, new Set(['1']))); |
+ assertFalse(commandManager.canExecute( |
+ Command.SHOW_IN_FOLDER, new Set(['12', '13']))); |
+ |
+ commandManager.handle(Command.SHOW_IN_FOLDER, new Set(['12'])); |
+ assertEquals('select-folder', store.lastAction.name); |
+ assertEquals('1', store.lastAction.id); |
+ }); |
+ |
test('does not delete children at same time as ancestor', function() { |
var lastDelete = null; |
chrome.bookmarkManagerPrivate.removeTrees = function(idArray) { |