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

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

Issue 2813503002: MD Bookmarks: Prevent navigating to invalid folders (Closed)
Patch Set: Add positive test case 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
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 68eabe1c8799b1a0d2fa061c6cc9cbd286771396..151455d517fe60c3844b18d2847b2a84de61cc5d 100644
--- a/chrome/test/data/webui/md_bookmarks/router_test.js
+++ b/chrome/test/data/webui/md_bookmarks/router_test.js
@@ -13,6 +13,7 @@ suite('<bookmarks-router>', function() {
setup(function() {
store = new bookmarks.TestStore({
+ nodes: testTree(createFolder('1', [createFolder('2', [])])),
selectedId: '1',
search: {
term: '',
@@ -31,17 +32,17 @@ suite('<bookmarks-router>', function() {
});
test('selected folder updates from route', function() {
- navigateTo('/?id=5');
+ navigateTo('/?id=2');
assertEquals('select-folder', store.lastAction.name);
- assertEquals('5', store.lastAction.id);
+ assertEquals('2', store.lastAction.id);
});
test('route updates from ID', function() {
- store.data.selectedFolder = '6';
+ store.data.selectedFolder = '2';
store.notifyObservers();
return Promise.resolve().then(function() {
- assertEquals('chrome://bookmarks/?id=6', window.location.href);
+ assertEquals('chrome://bookmarks/?id=2', window.location.href);
});
});

Powered by Google App Engine
This is Rietveld 408576698