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

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

Issue 2929053004: MD Bookmarks: Make shortcuts for select all/deselect all global (Closed)
Patch Set: Fix test flub 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/list.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/md_bookmarks_focus_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js b/chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js
index 8ac2961d53b10adc9f5b202ac8fded8a3301ee11..ba79c7de13aa31d25259bbf31b9d65d1c0a1c74c 100644
--- a/chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js
+++ b/chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js
@@ -202,6 +202,7 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
var list;
var store;
var items;
+ var commandManager;
var multiKey = cr.isMac ? 'meta' : 'ctrl';
function keydown(item, key, modifiers) {
@@ -232,6 +233,9 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
replaceBody(list);
Polymer.dom.flush();
items = list.root.querySelectorAll('bookmarks-item');
+
+ commandManager = new TestCommandManager();
+ document.body.appendChild(commandManager);
});
test('simple keyboard selection', function() {
@@ -276,7 +280,7 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
keydown(focusedItem, 'Escape');
assertDeepEquals([], normalizeSet(store.data.selection.items));
- keydown(focusedItem, 'a', 'ctrl');
+ keydown(focusedItem, 'a', multiKey);
assertDeepEquals(
['2', '3', '4', '5', '6', '7'],
normalizeSet(store.data.selection.items));
@@ -366,8 +370,6 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
});
test('keyboard commands are passed to command manager', function() {
- var commandManager = new TestCommandManager();
- document.body.appendChild(commandManager);
chrome.bookmarkManagerPrivate.removeTrees = function() {}
store.data.selection.items = new Set(['2', '3']);
@@ -386,9 +388,6 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
// Iron-list attempts to focus the whole <bookmarks-item> when pressing
// enter on the menu button. This checks that we block this behavior
// during keydown on <bookmarks-list>.
- var commandManager = new TestCommandManager();
- document.body.appendChild(commandManager);
-
var button = items[0].$$('.more-vert-button');
button.focus();
keydown(button, 'Enter');
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698