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

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

Issue 2813503002: MD Bookmarks: Prevent navigating to invalid folders (Closed)
Patch Set: handleAction -> dispatch 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/test/data/webui/md_bookmarks/actions_test.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/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 fc8fcbb727ae737ac0c2fb772931648f44affda6..ecba392f5fc2fd96345f68e64da6905eb8100cdd 100644
--- a/chrome/test/data/webui/md_bookmarks/router_test.js
+++ b/chrome/test/data/webui/md_bookmarks/router_test.js
@@ -75,8 +75,6 @@ suite('URL preload', function() {
window.history.replaceState({}, '', url);
chrome.bookmarks.getTree = function(callback) {
- console.log('getTree');
- console.log(window.location.href);
callback([
createFolder(
'0',
@@ -116,4 +114,13 @@ suite('URL preload', function() {
assertEquals('2', state.selectedFolder);
assertDeepEquals(['21'], bookmarks.util.getDisplayedList(state));
});
+
+ test('loading an invalid folder URL selects the Bookmarks Bar', function() {
+ setupWithUrl('/?id=42');
+ var state = bookmarks.Store.getInstance().data;
+ assertEquals('1', state.selectedFolder);
+ return Promise.resolve().then(function() {
+ assertEquals('chrome://bookmarks/?id=1', window.location.href);
+ });
+ });
});
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/actions_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698