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

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

Issue 2920413002: MD Bookmarks: Focus sidebar nodes on click without showing an outline (Closed)
Patch Set: Rewrite to use a function rather than a property 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
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 27072b0c9b5056dbf9a4f137ebe821dc13d36eb4..84e4cd3d0c3ce20eaeeb8ad1144913086d23021c 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
@@ -72,7 +72,7 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
test('keyboard selection', function() {
function assertFocused(oldFocus, newFocus) {
assertEquals(
- '', getFolderNode(oldFocus).$.container.getAttribute('tabindex'));
+ '-1', getFolderNode(oldFocus).$.container.getAttribute('tabindex'));
assertEquals(
'0', getFolderNode(newFocus).$.container.getAttribute('tabindex'));
assertEquals(
@@ -87,8 +87,9 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
assertEquals(
'0', getFolderNode('1').$.container.getAttribute('tabindex'));
- // Only the selected folder should be focusable.
- assertEquals('', getFolderNode('2').$.container.getAttribute('tabindex'));
+ // Only the selected folder should be keyboard focusable.
+ assertEquals(
+ '-1', getFolderNode('2').$.container.getAttribute('tabindex'));
// Give keyboard focus to the first item.
getFolderNode('1').$.container.focus();
@@ -100,7 +101,8 @@ TEST_F('MaterialBookmarksFocusTest', 'All', function() {
store.data.selectedFolder = '2';
store.notifyObservers();
- assertEquals('', getFolderNode('1').$.container.getAttribute('tabindex'));
+ assertEquals(
+ '-1', getFolderNode('1').$.container.getAttribute('tabindex'));
assertEquals(
'0', getFolderNode('2').$.container.getAttribute('tabindex'));
assertFocused('1', '2');

Powered by Google App Engine
This is Rietveld 408576698