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

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

Issue 2940233003: MD Bookmarks: Lazily render dropdown menus (Closed)
Patch Set: Rebase Created 3 years, 6 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
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/command_manager_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-toolbar>', function() { 5 suite('<bookmarks-toolbar>', function() {
6 var toolbar; 6 var toolbar;
7 var store; 7 var store;
8 var commandManager; 8 var commandManager;
9 9
10 suiteSetup(function() { 10 suiteSetup(function() {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 store.data.selection.items = new Set(['2', '3']); 81 store.data.selection.items = new Set(['2', '3']);
82 store.notifyObservers(); 82 store.notifyObservers();
83 Polymer.dom.flush(); 83 Polymer.dom.flush();
84 84
85 assertTrue(toolbar.showSelectionOverlay); 85 assertTrue(toolbar.showSelectionOverlay);
86 assertTrue( 86 assertTrue(
87 toolbar.$$('cr-toolbar-selection-overlay').deleteButton.disabled); 87 toolbar.$$('cr-toolbar-selection-overlay').deleteButton.disabled);
88 }); 88 });
89 89
90 test('overflow menu options are disabled when appropriate', function() { 90 test('overflow menu options are disabled when appropriate', function() {
91 MockInteractions.tap(toolbar.$.menuButton);
92 Polymer.dom.flush();
93
91 store.data.selectedFolder = '1'; 94 store.data.selectedFolder = '1';
92 store.notifyObservers(); 95 store.notifyObservers();
93 96
94 assertFalse(toolbar.$.addBookmarkButton.disabled); 97 assertFalse(toolbar.$$('#addBookmarkButton').disabled);
95 98
96 store.data.selectedFolder = '4'; 99 store.data.selectedFolder = '4';
97 store.notifyObservers(); 100 store.notifyObservers();
98 101
99 assertTrue(toolbar.$.addBookmarkButton.disabled); 102 assertTrue(toolbar.$$('#addBookmarkButton').disabled);
100 assertFalse(toolbar.$.importBookmarkButton.disabled); 103 assertFalse(toolbar.$$('#importBookmarkButton').disabled);
101 104
102 store.data.prefs.canEdit = false; 105 store.data.prefs.canEdit = false;
103 store.notifyObservers(); 106 store.notifyObservers();
104 107
105 assertTrue(toolbar.$.addBookmarkButton.disabled); 108 assertTrue(toolbar.$$('#addBookmarkButton').disabled);
106 assertTrue(toolbar.$.importBookmarkButton.disabled); 109 assertTrue(toolbar.$$('#importBookmarkButton').disabled);
107 }); 110 });
108 }); 111 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/command_manager_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698