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

Side by Side Diff: chrome/test/data/webui/settings/reset_page_test.js

Issue 2150983002: MD Settings: Disallow clicking on "Reset" when resetting profile is in progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO Created 4 years, 5 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/browser/resources/settings/reset_page/reset_profile_dialog.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 cr.define('settings_reset_page', function() { 5 cr.define('settings_reset_page', function() {
6 /** @enum {string} */ 6 /** @enum {string} */
7 var TestNames = { 7 var TestNames = {
8 PowerwashDialogAction: 'PowerwashDialogAction', 8 PowerwashDialogAction: 'PowerwashDialogAction',
9 PowerwashDialogOpenClose: 'PowerwashDialogOpenClose', 9 PowerwashDialogOpenClose: 'PowerwashDialogOpenClose',
10 ResetBannerClose: 'ResetBannerClose', 10 ResetBannerClose: 'ResetBannerClose',
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 MockInteractions.tap(resetPage.$.resetProfile); 205 MockInteractions.tap(resetPage.$.resetProfile);
206 var dialog = resetPage.$$('settings-reset-profile-dialog'); 206 var dialog = resetPage.$$('settings-reset-profile-dialog');
207 assertTrue(!!dialog); 207 assertTrue(!!dialog);
208 208
209 var showReportedSettingsLink = dialog.$$('.footer a'); 209 var showReportedSettingsLink = dialog.$$('.footer a');
210 assertTrue(!!showReportedSettingsLink); 210 assertTrue(!!showReportedSettingsLink);
211 MockInteractions.tap(showReportedSettingsLink); 211 MockInteractions.tap(showReportedSettingsLink);
212 212
213 return resetPageBrowserProxy.whenCalled('showReportedSettings').then( 213 return resetPageBrowserProxy.whenCalled('showReportedSettings').then(
214 function() { 214 function() {
215 assertFalse(dialog.$.reset.disabled);
216 assertFalse(dialog.$.resetSpinner.active);
215 MockInteractions.tap(dialog.$.reset); 217 MockInteractions.tap(dialog.$.reset);
218 assertTrue(dialog.$.reset.disabled);
219 assertTrue(dialog.$.resetSpinner.active);
216 return resetPageBrowserProxy.whenCalled( 220 return resetPageBrowserProxy.whenCalled(
217 'performResetProfileSettings'); 221 'performResetProfileSettings');
218 }); 222 });
219 }); 223 });
220 224
221 if (cr.isChromeOS) { 225 if (cr.isChromeOS) {
222 /** 226 /**
223 * @param {function(SettingsPowerwashDialogElemeent):!Element} 227 * @param {function(SettingsPowerwashDialogElemeent):!Element}
224 * closeButtonFn A function that returns the button to be used for 228 * closeButtonFn A function that returns the button to be used for
225 * closing the dialog. 229 * closing the dialog.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 }); 273 });
270 } 274 }
271 275
272 return { 276 return {
273 registerTests: function() { 277 registerTests: function() {
274 registerBannerTests(); 278 registerBannerTests();
275 registerDialogTests(); 279 registerDialogTests();
276 }, 280 },
277 }; 281 };
278 }); 282 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/reset_page/reset_profile_dialog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698