| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_about_page', function() { | 5 cr.define('settings_about_page', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @implements {settings.AboutPageBrowserProxy} | 8 * @implements {settings.AboutPageBrowserProxy} |
| 9 * @extends {settings.TestBrowserProxy} | 9 * @extends {settings.TestBrowserProxy} |
| 10 */ | 10 */ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 this.updateStatus_ = updateStatus; | 57 this.updateStatus_ = updateStatus; |
| 58 }, | 58 }, |
| 59 | 59 |
| 60 /** @override */ | 60 /** @override */ |
| 61 pageReady: function() { | 61 pageReady: function() { |
| 62 this.methodCalled('pageReady'); | 62 this.methodCalled('pageReady'); |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** @override */ | 65 /** @override */ |
| 66 refreshUpdateStatus: function() { | 66 refreshUpdateStatus: function() { |
| 67 cr.webUIListenerCallback( | 67 cr.webUIListenerCallback('update-status-changed', { |
| 68 'update-status-changed', {status: this.updateStatus_}); | 68 progress: 0, |
| 69 status: this.updateStatus_, |
| 70 }); |
| 69 this.methodCalled('refreshUpdateStatus'); | 71 this.methodCalled('refreshUpdateStatus'); |
| 70 }, | 72 }, |
| 71 | 73 |
| 72 /** @override */ | 74 /** @override */ |
| 73 openFeedbackDialog: function() { | 75 openFeedbackDialog: function() { |
| 74 this.methodCalled('openFeedbackDialog'); | 76 this.methodCalled('openFeedbackDialog'); |
| 75 }, | 77 }, |
| 76 | 78 |
| 77 /** @override */ | 79 /** @override */ |
| 78 openHelpPage: function() { | 80 openHelpPage: function() { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 TestAboutPageBrowserProxy.prototype.setChannel = function( | 133 TestAboutPageBrowserProxy.prototype.setChannel = function( |
| 132 channel, isPowerwashAllowed) { | 134 channel, isPowerwashAllowed) { |
| 133 this.methodCalled('setChannel', [channel, isPowerwashAllowed]); | 135 this.methodCalled('setChannel', [channel, isPowerwashAllowed]); |
| 134 }; | 136 }; |
| 135 } | 137 } |
| 136 | 138 |
| 137 | 139 |
| 138 function registerAboutPageTests() { | 140 function registerAboutPageTests() { |
| 139 /** @param {!UpdateStatus} status */ | 141 /** @param {!UpdateStatus} status */ |
| 140 function fireStatusChanged(status) { | 142 function fireStatusChanged(status) { |
| 141 cr.webUIListenerCallback('update-status-changed', {status: status}); | 143 cr.webUIListenerCallback('update-status-changed', { |
| 144 progress: 0, |
| 145 status: status, |
| 146 }); |
| 142 } | 147 } |
| 143 | 148 |
| 144 suite('AboutPageTest', function() { | 149 suite('AboutPageTest', function() { |
| 145 var page = null; | 150 var page = null; |
| 146 | 151 |
| 147 /** @type {?settings.TestAboutPageBrowserProxy} */ | 152 /** @type {?settings.TestAboutPageBrowserProxy} */ |
| 148 var aboutBrowserProxy = null; | 153 var aboutBrowserProxy = null; |
| 149 | 154 |
| 150 /** @type {?settings.TestLifetimeBrowserProxy} */ | 155 /** @type {?settings.TestLifetimeBrowserProxy} */ |
| 151 var lifetimeBrowserProxy = null; | 156 var lifetimeBrowserProxy = null; |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 registerTests: function() { | 716 registerTests: function() { |
| 712 if (cr.isChromeOS) { | 717 if (cr.isChromeOS) { |
| 713 registerDetailedBuildInfoTests(); | 718 registerDetailedBuildInfoTests(); |
| 714 registerChannelSwitcherDialogTests(); | 719 registerChannelSwitcherDialogTests(); |
| 715 } | 720 } |
| 716 registerAboutPageTests(); | 721 registerAboutPageTests(); |
| 717 }, | 722 }, |
| 718 registerOfficialBuildTests: registerOfficialBuildTests, | 723 registerOfficialBuildTests: registerOfficialBuildTests, |
| 719 }; | 724 }; |
| 720 }); | 725 }); |
| OLD | NEW |