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

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

Issue 2960143002: MD Bookmarks: Remove '/?id=1' from URL when displaying Bookmarks Bar (Closed)
Patch Set: Review comments Created 3 years, 5 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/bookmarks_ui_browsertest.cc ('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/router_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/router_test.js b/chrome/test/data/webui/md_bookmarks/router_test.js
index f118c12ca61f2ea5753782fba6ca9bb807397152..87ea0593d4e8b2d8fdebec150498628eb821e79d 100644
--- a/chrome/test/data/webui/md_bookmarks/router_test.js
+++ b/chrome/test/data/webui/md_bookmarks/router_test.js
@@ -43,6 +43,11 @@ suite('<bookmarks-router>', function() {
return Promise.resolve().then(function() {
assertEquals('chrome://bookmarks/?id=2', window.location.href);
+ store.data.selectedFolder = '1';
+ store.notifyObservers();
+ }).then(function() {
+ // Selecting Bookmarks bar clears route.
+ assertEquals('chrome://bookmarks/', window.location.href);
});
});
@@ -62,6 +67,13 @@ suite('<bookmarks-router>', function() {
assertEquals('chrome://bookmarks/?q=bloop', window.location.href);
});
});
+
+ test('bookmarks bar selected with empty route', function() {
+ navigateTo('/?id=2');
+ navigateTo('/');
+ assertEquals('select-folder', store.lastAction.name);
+ assertEquals('1', store.lastAction.id);
+ });
});
suite('URL preload', function() {
@@ -120,7 +132,7 @@ suite('URL preload', function() {
var state = bookmarks.Store.getInstance().data;
assertEquals('1', state.selectedFolder);
return Promise.resolve().then(function() {
- assertEquals('chrome://bookmarks/?id=1', window.location.href);
+ assertEquals('chrome://bookmarks/', window.location.href);
});
});
});
« no previous file with comments | « chrome/browser/ui/webui/bookmarks_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698