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

Side by Side Diff: chrome/test/data/webui/md_bookmarks/router_test.js

Issue 2812493002: MD Bookmarks: Restore any previously selected folder when clearing search (Closed)
Patch Set: Fix comment 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 suite('<bookmarks-router>', function() { 5 suite('<bookmarks-router>', function() {
6 var store; 6 var store;
7 var router; 7 var router;
8 8
9 function navigateTo(route) { 9 function navigateTo(route) {
10 window.history.replaceState({}, '', route); 10 window.history.replaceState({}, '', route);
11 window.dispatchEvent(new CustomEvent('location-changed')); 11 window.dispatchEvent(new CustomEvent('location-changed'));
12 } 12 }
13 13
14 setup(function() { 14 setup(function() {
15 store = new bookmarks.TestStore({ 15 store = new bookmarks.TestStore({
16 selectedId: '1', 16 selectedFolder: '1',
17 search: { 17 search: {
18 term: '', 18 term: '',
19 }, 19 },
20 }); 20 });
21 bookmarks.Store.instance_ = store; 21 bookmarks.Store.instance_ = store;
22 22
23 router = document.createElement('bookmarks-router'); 23 router = document.createElement('bookmarks-router');
24 replaceBody(router); 24 replaceBody(router);
25 }); 25 });
26 26
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 if (window.searchedQuery) { 73 if (window.searchedQuery) {
74 verifySearch(window.searchedQuery); 74 verifySearch(window.searchedQuery);
75 return; 75 return;
76 } 76 }
77 77
78 chrome.bookmarks.search = verifySearch; 78 chrome.bookmarks.search = verifySearch;
79 }); 79 });
80 }); 80 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/reducers_test.js ('k') | chrome/test/data/webui/md_bookmarks/sidebar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698