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..979de0d3be06b6d6658cad207df3c32387f03a8d 100644 |
--- a/chrome/test/data/webui/md_bookmarks/router_test.js |
+++ b/chrome/test/data/webui/md_bookmarks/router_test.js |
@@ -62,6 +62,25 @@ 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); |
+ }); |
+ |
+ test('selecting bookmarks bar clears route', function() { |
+ store.data.selectedFolder = '2'; |
+ store.notifyObservers(); |
+ |
+ return Promise.resolve().then(function() { |
+ store.data.selectedFolder = '1'; |
+ store.notifyObservers(); |
+ }).then(function() { |
+ assertEquals('chrome://bookmarks/', window.location.href); |
calamity
2017/07/05 04:04:39
Assert above this that the route was ?id=2 at some
tsergeant
2017/07/05 07:37:36
Done, by moving this extra check up into the test
|
+ }); |
+ }); |
}); |
suite('URL preload', function() { |
@@ -120,7 +139,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); |
}); |
}); |
}); |