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

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

Issue 2804543002: [MD Bookmarks] Fix sidebar issues. (Closed)
Patch Set: dbeam review 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
« no previous file with comments | « chrome/browser/resources/md_bookmarks/constants.js ('k') | ui/webui/resources/js/cr/ui/splitter.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_bookmarks/app_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/app_test.js b/chrome/test/data/webui/md_bookmarks/app_test.js
index 8ea1bc76efbde78e9c41a246dbe263f6c5984500..4a80959ea3d3e6ad909a97e5203ed46819cd0397 100644
--- a/chrome/test/data/webui/md_bookmarks/app_test.js
+++ b/chrome/test/data/webui/md_bookmarks/app_test.js
@@ -27,15 +27,13 @@ suite('<bookmarks-app>', function() {
}
setup(function() {
+ window.localStorage.clear();
resetStore();
app = document.createElement('bookmarks-app');
replaceBody(app);
});
- teardown(function() {
- window.localStorage.clear();
- });
test('write and load closed folder state', function() {
var closedFoldersList = ['1'];
@@ -55,4 +53,20 @@ suite('<bookmarks-app>', function() {
// Ensure closed folders are read from local storage.
assertDeepEquals(closedFoldersList, normalizeSet(store.data.closedFolders));
});
+
+ test('write and load sidebar width', function() {
+ assertEquals(
+ app.$.sidebar.getComputedStyleValue('width'), app.sidebarWidth_);
+
+ var sidebarWidth = '500px';
+ app.$.sidebar.style.width = sidebarWidth;
+ cr.dispatchSimpleEvent(app.$.splitter, 'resize');
+ assertEquals(
+ sidebarWidth, window.localStorage[LOCAL_STORAGE_TREE_WIDTH_KEY]);
+
+ app = document.createElement('bookmarks-app');
+ replaceBody(app);
+
+ assertEquals(sidebarWidth, app.$.sidebar.style.width);
+ });
});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/constants.js ('k') | ui/webui/resources/js/cr/ui/splitter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698