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

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

Issue 2872163002: MD Bookmarks: Add 'Open' command, to open in either the BMM or in new tabs (Closed)
Patch Set: Rebase Created 3 years, 7 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/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 4d29419044d668050da7898479740a369c90ae50..caddf52419b1b63dd8ea058b20c0638b927b9c66 100644
--- a/chrome/test/data/webui/md_bookmarks/item_test.js
+++ b/chrome/test/data/webui/md_bookmarks/item_test.js
@@ -12,8 +12,8 @@ suite('<bookmarks-item>', function() {
nodes: testTree(createFolder(
'1',
[
- createItem(['2']),
- createItem(['3']),
+ createItem('2', {url: 'http://example.com/'}),
+ createItem('3'),
])),
});
bookmarks.Store.instance_ = store;
@@ -60,4 +60,16 @@ suite('<bookmarks-item>', function() {
bookmarks.actions.selectItem('2', false, false, store.data),
store.lastAction);
});
+
+ test('anchor tag updates with item url', function() {
+ assertEquals('http://example.com/', item.$.url.href);
+
+ store.data.nodes['2'] = createItem('0', {url: 'https://mail.google.com'});
+ store.notifyObservers();
+ assertEquals('https://mail.google.com/', item.$.url.href);
+
+ // Change to a folder.
+ item.itemId = '1';
+ assertEquals('chrome://bookmarks/?id=1', item.$.url.href);
+ });
});
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/command_manager_test.js ('k') | chrome/test/data/webui/md_bookmarks/list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698