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

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

Issue 2814023004: [MD Bookmarks] Right click on bookmark items open context menu. (Closed)
Patch Set: fix_nit Created 3 years, 8 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/item_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/item_test.js b/chrome/test/data/webui/md_bookmarks/item_test.js
index 5b39c7d67774c1d5e438b645eb7d49dbc2ddb5ff..4d29419044d668050da7898479740a369c90ae50 100644
--- a/chrome/test/data/webui/md_bookmarks/item_test.js
+++ b/chrome/test/data/webui/md_bookmarks/item_test.js
@@ -48,4 +48,16 @@ suite('<bookmarks-item>', function() {
bookmarks.actions.selectItem('2', false, false, store.data),
store.lastAction);
});
+
+ test('context menu selects item if unselected', function() {
+ item.isSelectedItem_ = true;
+ item.dispatchEvent(new MouseEvent('contextmenu'));
+ assertEquals(null, store.lastAction);
+
+ item.isSelectedItem_ = false;
+ item.dispatchEvent(new MouseEvent('contextmenu'));
+ assertDeepEquals(
+ bookmarks.actions.selectItem('2', false, false, store.data),
+ store.lastAction);
+ });
});
« 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