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

Unified Diff: chrome/test/data/webui/md_bookmarks/command_manager_test.js

Issue 2956213002: [MD Bookmarks] Make disabled buttons in context menu do nothing when clicked. (Closed)
Patch Set: use on-click Created 3 years, 6 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 | « chrome/browser/resources/md_bookmarks/command_manager.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47c55630ee3b02db4b10b42e3e660961048434c0..f4672d1e86bd208b75a7efa8b3e2d41325385d70 100644
--- a/chrome/test/data/webui/md_bookmarks/command_manager_test.js
+++ b/chrome/test/data/webui/md_bookmarks/command_manager_test.js
@@ -264,6 +264,7 @@ suite('<bookmarks-command-manager>', function() {
test('cannot edit unmodifiable nodes', function() {
// Cannot edit root folders.
var items = new Set(['1']);
+ store.data.selection.items = items;
assertFalse(commandManager.canExecute(Command.EDIT, items));
assertFalse(commandManager.canExecute(Command.DELETE, items));
@@ -273,6 +274,14 @@ suite('<bookmarks-command-manager>', function() {
items = new Set(['12']);
assertFalse(commandManager.canExecute(Command.EDIT, items));
assertFalse(commandManager.canExecute(Command.DELETE, items));
+
+ commandManager.openCommandMenuAtPosition(0, 0);
+ var commandItem = {};
+ commandManager.root.querySelectorAll('.dropdown-item').forEach(element => {
+ commandItem[element.getAttribute('command')] = element;
+ });
+ MockInteractions.tap(commandItem[Command.EDIT]);
+ commandManager.assertLastCommand(null);
});
});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/command_manager.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698