Chromium Code Reviews| 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 8b9099f329e4430e50e9f279220833e61c9004d6..354aa22d8fa66bb8453369b13b27a769efd03e82 100644 |
| --- a/chrome/test/data/webui/md_bookmarks/store_test.js |
| +++ b/chrome/test/data/webui/md_bookmarks/store_test.js |
| @@ -171,4 +171,22 @@ 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(undefined, 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); |
| + }); |
|
jiaxi
2017/01/06 06:03:53
As discussed offline, integration test with someth
|
| }); |