| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |