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

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

Issue 2617943002: [MD Bookmarks] Edit Bookmarks. (Closed)
Patch Set: test fix Created 3 years, 11 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/ui/webui/md_bookmarks/md_bookmarks_ui.cc ('k') | components/bookmark_component_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_bookmarks/store_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/store_test.js b/chrome/test/data/webui/md_bookmarks/store_test.js
index 1322a78742cce7421967961832567c6dbb7114af..ebc15638053f0eb4783659e0c7e4bb285f248544 100644
--- a/chrome/test/data/webui/md_bookmarks/store_test.js
+++ b/chrome/test/data/webui/md_bookmarks/store_test.js
@@ -167,4 +167,24 @@ suite('<bookmarks-store>', function() {
assertTrue(store.idToNodeMap_['0'].isSelected);
assertEquals('0', store.selectedId);
});
+
+ test('bookmark gets updated after editing', function() {
+ // Edit title updates idToNodeMap_ properly.
+ store.onBookmarkChanged_('4', {'title': 'test'});
+ assertEquals('test', store.idToNodeMap_['4'].title);
+ assertEquals('link4', store.idToNodeMap_['4'].url);
+
+ // Edit url updates idToNodeMap_ properly.
+ store.onBookmarkChanged_('5', {'url': 'http://www.google.com'});
+ assertEquals('', store.idToNodeMap_['5'].title);
+ assertEquals('http://www.google.com', store.idToNodeMap_['5'].url);
+
+ // Edit url and title updates idToNodeMap_ properly.
+ store.onBookmarkChanged_('2', {
+ 'title': 'test',
+ 'url': 'http://www.google.com',
+ });
+ assertEquals('test', store.idToNodeMap_['2'].title);
+ assertEquals('http://www.google.com', store.idToNodeMap_['2'].url);
+ });
});
« no previous file with comments | « chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc ('k') | components/bookmark_component_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698