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

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

Issue 2823053003: [MD Bookmarks] Remove the bookmarks-sidebar element. (Closed)
Patch Set: rebase, address comments 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-app>', function() { 5 suite('<bookmarks-app>', function() {
6 var app; 6 var app;
7 var store; 7 var store;
8 8
9 function resetStore() { 9 function resetStore() {
10 store = new bookmarks.TestStore({}); 10 store = new bookmarks.TestStore({});
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 resetStore(); 49 resetStore();
50 app = document.createElement('bookmarks-app'); 50 app = document.createElement('bookmarks-app');
51 replaceBody(app); 51 replaceBody(app);
52 52
53 // Ensure closed folders are read from local storage. 53 // Ensure closed folders are read from local storage.
54 assertDeepEquals(closedFoldersList, normalizeSet(store.data.closedFolders)); 54 assertDeepEquals(closedFoldersList, normalizeSet(store.data.closedFolders));
55 }); 55 });
56 56
57 test('write and load sidebar width', function() { 57 test('write and load sidebar width', function() {
58 assertEquals( 58 assertEquals(
59 app.$.sidebar.getComputedStyleValue('width'), app.sidebarWidth_); 59 getComputedStyle(app.$.sidebar).width, app.sidebarWidth_);
60 60
61 var sidebarWidth = '500px'; 61 var sidebarWidth = '500px';
62 app.$.sidebar.style.width = sidebarWidth; 62 app.$.sidebar.style.width = sidebarWidth;
63 cr.dispatchSimpleEvent(app.$.splitter, 'resize'); 63 cr.dispatchSimpleEvent(app.$.splitter, 'resize');
64 assertEquals( 64 assertEquals(
65 sidebarWidth, window.localStorage[LOCAL_STORAGE_TREE_WIDTH_KEY]); 65 sidebarWidth, window.localStorage[LOCAL_STORAGE_TREE_WIDTH_KEY]);
66 66
67 app = document.createElement('bookmarks-app'); 67 app = document.createElement('bookmarks-app');
68 replaceBody(app); 68 replaceBody(app);
69 69
70 assertEquals(sidebarWidth, app.$.sidebar.style.width); 70 assertEquals(sidebarWidth, app.$.sidebar.style.width);
71 }); 71 });
72 }); 72 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc ('k') | chrome/test/data/webui/md_bookmarks/dnd_manager_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698