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

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: Complete rewrite Created 3 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
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);
+ });
});

Powered by Google App Engine
This is Rietveld 408576698