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

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

Issue 2740863003: MD Bookmarks: Implement search and selection in new data flow system (Closed)
Patch Set: Review round 2 Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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-sidebar>', function() { 5 suite('<bookmarks-sidebar>', function() {
6 var sidebar; 6 var sidebar;
7 var store; 7 var store;
8 8
9 setup(function() { 9 setup(function() {
10 store = new bookmarks.TestStore({ 10 store = new bookmarks.TestStore({
11 nodes: testTree(createFolder('0', [ 11 nodes: testTree(
12 createFolder( 12 createFolder(
13 '1', 13 '1',
14 [ 14 [
15 createFolder( 15 createFolder(
16 '2', 16 '2',
17 [ 17 [
18 createFolder('3', []), 18 createFolder('3', []),
19 createFolder('4', []), 19 createFolder('4', []),
20 ]), 20 ]),
21 createItem('5'), 21 createItem('5'),
22 ]), 22 ]),
23 createFolder('7', []), 23 createFolder('7', [])),
24 ])),
25 }); 24 });
26 bookmarks.Store.instance_ = store; 25 bookmarks.Store.instance_ = store;
27 26
28 sidebar = document.createElement('bookmarks-sidebar'); 27 sidebar = document.createElement('bookmarks-sidebar');
29 replaceBody(sidebar); 28 replaceBody(sidebar);
30 Polymer.dom.flush(); 29 Polymer.dom.flush();
31 }); 30 });
32 31
33 test('selecting and deselecting folders dispatches action', function() { 32 test('selecting and deselecting folders dispatches action', function() {
34 var rootFolders = 33 var rootFolders =
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 Array.prototype.forEach.call(firstGen, function(f) { 65 Array.prototype.forEach.call(firstGen, function(f) {
67 assertEquals(1, f.depth); 66 assertEquals(1, f.depth);
68 assertEquals('1', f.style.getPropertyValue('--node-depth')); 67 assertEquals('1', f.style.getPropertyValue('--node-depth'));
69 }); 68 });
70 Array.prototype.forEach.call(secondGen, function(f) { 69 Array.prototype.forEach.call(secondGen, function(f) {
71 assertEquals(2, f.depth); 70 assertEquals(2, f.depth);
72 assertEquals('2', f.style.getPropertyValue('--node-depth')); 71 assertEquals('2', f.style.getPropertyValue('--node-depth'));
73 }); 72 });
74 }) 73 })
75 }); 74 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/reducers_test.js ('k') | chrome/test/data/webui/md_bookmarks/test_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698