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

Side by Side Diff: chrome/test/data/webui/md_bookmarks/item_test.js

Issue 2885723002: [MD Bookmarks] Add keyboard navigation and selection to bookmark list. (Closed)
Patch Set: address comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 suite('<bookmarks-item>', function() { 5 suite('<bookmarks-item>', function() {
6 var item; 6 var item;
7 var store; 7 var store;
8 var TEST_ITEM = createItem('0'); 8 var TEST_ITEM = createItem('0');
9 9
10 setup(function() { 10 setup(function() {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 item.isSelectedItem_ = false; 61 item.isSelectedItem_ = false;
62 item.dispatchEvent(new MouseEvent('contextmenu')); 62 item.dispatchEvent(new MouseEvent('contextmenu'));
63 assertDeepEquals( 63 assertDeepEquals(
64 bookmarks.actions.selectItem('2', store.data, { 64 bookmarks.actions.selectItem('2', store.data, {
65 clear: true, 65 clear: true,
66 range: false, 66 range: false,
67 toggle: false, 67 toggle: false,
68 }), 68 }),
69 store.lastAction); 69 store.lastAction);
70 }); 70 });
71
72 test('anchor tag updates with item url', function() {
73 assertEquals('http://example.com/', item.$.url.href);
74
75 store.data.nodes['2'] = createItem('0', {url: 'https://mail.google.com'});
76 store.notifyObservers();
77 assertEquals('https://mail.google.com/', item.$.url.href);
78
79 // Change to a folder.
80 item.itemId = '1';
81 assertEquals('chrome://bookmarks/?id=1', item.$.url.href);
82 });
83 }); 71 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/reducers.js ('k') | chrome/test/data/webui/md_bookmarks/md_bookmarks_focus_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698