| 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 {TestBrowserProxy} |
| 10 */ | 10 */ |
| 11 var TestAboutPageBrowserProxy = function() { | 11 var TestAboutPageBrowserProxy = function() { |
| 12 var methodNames = [ | 12 var methodNames = [ |
| 13 'pageReady', | 13 'pageReady', |
| 14 'refreshUpdateStatus', | 14 'refreshUpdateStatus', |
| 15 'openHelpPage', | 15 'openHelpPage', |
| 16 'openFeedbackDialog', | 16 'openFeedbackDialog', |
| 17 ]; | 17 ]; |
| 18 | 18 |
| 19 if (cr.isChromeOS) { | 19 if (cr.isChromeOS) { |
| 20 methodNames.push( | 20 methodNames.push( |
| 21 'getChannelInfo', | 21 'getChannelInfo', |
| 22 'getVersionInfo', | 22 'getVersionInfo', |
| 23 'getRegulatoryInfo', | 23 'getRegulatoryInfo', |
| 24 'setChannel'); | 24 'setChannel'); |
| 25 } | 25 } |
| 26 | 26 |
| 27 if (cr.isMac) | 27 if (cr.isMac) |
| 28 methodNames.push('promoteUpdater'); | 28 methodNames.push('promoteUpdater'); |
| 29 | 29 |
| 30 settings.TestBrowserProxy.call(this, methodNames); | 30 TestBrowserProxy.call(this, methodNames); |
| 31 | 31 |
| 32 /** @private {!UpdateStatus} */ | 32 /** @private {!UpdateStatus} */ |
| 33 this.updateStatus_ = UpdateStatus.UPDATED; | 33 this.updateStatus_ = UpdateStatus.UPDATED; |
| 34 | 34 |
| 35 if (cr.isChromeOS) { | 35 if (cr.isChromeOS) { |
| 36 /** @private {!VersionInfo} */ | 36 /** @private {!VersionInfo} */ |
| 37 this.versionInfo_ = { | 37 this.versionInfo_ = { |
| 38 arcVersion: '', | 38 arcVersion: '', |
| 39 osFirmware: '', | 39 osFirmware: '', |
| 40 osVersion: '', | 40 osVersion: '', |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 /** @private {!ChannelInfo} */ | 43 /** @private {!ChannelInfo} */ |
| 44 this.channelInfo_ = { | 44 this.channelInfo_ = { |
| 45 currentChannel: BrowserChannel.BETA, | 45 currentChannel: BrowserChannel.BETA, |
| 46 targetChannel: BrowserChannel.BETA, | 46 targetChannel: BrowserChannel.BETA, |
| 47 canChangeChannel: true, | 47 canChangeChannel: true, |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 /** @private {?RegulatoryInfo} */ | 50 /** @private {?RegulatoryInfo} */ |
| 51 this.regulatoryInfo_ = null; | 51 this.regulatoryInfo_ = null; |
| 52 } | 52 } |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 TestAboutPageBrowserProxy.prototype = { | 55 TestAboutPageBrowserProxy.prototype = { |
| 56 __proto__: settings.TestBrowserProxy.prototype, | 56 __proto__: TestBrowserProxy.prototype, |
| 57 | 57 |
| 58 /** @param {!UpdateStatus} updateStatus */ | 58 /** @param {!UpdateStatus} updateStatus */ |
| 59 setUpdateStatus: function(updateStatus) { | 59 setUpdateStatus: function(updateStatus) { |
| 60 this.updateStatus_ = updateStatus; | 60 this.updateStatus_ = updateStatus; |
| 61 }, | 61 }, |
| 62 | 62 |
| 63 sendStatusNoInternet: function() { | 63 sendStatusNoInternet: function() { |
| 64 cr.webUIListenerCallback('update-status-changed', { | 64 cr.webUIListenerCallback('update-status-changed', { |
| 65 progress: 0, | 65 progress: 0, |
| 66 status: UpdateStatus.FAILED, | 66 status: UpdateStatus.FAILED, |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 registerTests: function() { | 876 registerTests: function() { |
| 877 if (cr.isChromeOS) { | 877 if (cr.isChromeOS) { |
| 878 registerDetailedBuildInfoTests(); | 878 registerDetailedBuildInfoTests(); |
| 879 registerChannelSwitcherDialogTests(); | 879 registerChannelSwitcherDialogTests(); |
| 880 } | 880 } |
| 881 registerAboutPageTests(); | 881 registerAboutPageTests(); |
| 882 }, | 882 }, |
| 883 registerOfficialBuildTests: registerOfficialBuildTests, | 883 registerOfficialBuildTests: registerOfficialBuildTests, |
| 884 }; | 884 }; |
| 885 }); | 885 }); |
| OLD | NEW |