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

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

Issue 2885353002: MD Bookmarks: Prevent keyboard shortcuts when the toolbar/dialogs are focused (Closed)
Patch Set: Add a test 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/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js ('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/toolbar_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/toolbar_test.js b/chrome/test/data/webui/md_bookmarks/toolbar_test.js
index 8e5d470d38f24d0d61ec43de90435a956eb2ea9e..b34a350d1e5348ce167893608108ac62f348e68d 100644
--- a/chrome/test/data/webui/md_bookmarks/toolbar_test.js
+++ b/chrome/test/data/webui/md_bookmarks/toolbar_test.js
@@ -53,4 +53,15 @@ suite('<bookmarks-toolbar>', function() {
commandManager.assertLastCommand(Command.DELETE, ['2', '3']);
});
+
+ test('commands do not trigger from the search field', function() {
+ store.data.selection.items = new Set(['2']);
+ store.notifyObservers();
+
+ var input = toolbar.$$('cr-toolbar').getSearchField().getSearchInput();
+ var modifier = cr.isMac ? 'meta' : 'ctrl';
+ MockInteractions.pressAndReleaseKeyOn(input, 67, modifier, 'c');
+
+ commandManager.assertLastCommand(null);
+ });
});
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698