| 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 /** | 5 /** |
| 6 * The mock signin.ProfileBrowserProxy. | 6 * The mock signin.ProfileBrowserProxy. |
| 7 * | 7 * |
| 8 * @constructor | 8 * @constructor |
| 9 * @implements {signin.ProfileBrowserProxy} | 9 * @implements {signin.ProfileBrowserProxy} |
| 10 * @extends {settings.TestBrowserProxy} | 10 * @extends {settings.TestBrowserProxy} |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 this.iconUrls_ = []; | 26 this.iconUrls_ = []; |
| 27 | 27 |
| 28 /** @private {!Array<SignedInUser>} */ | 28 /** @private {!Array<SignedInUser>} */ |
| 29 this.signedInUsers_ = []; | 29 this.signedInUsers_ = []; |
| 30 | 30 |
| 31 /** @private {!ProfileInfo} */ | 31 /** @private {!ProfileInfo} */ |
| 32 this.defaultProfileInfo_ = {}; | 32 this.defaultProfileInfo_ = {}; |
| 33 | 33 |
| 34 /** @private {!Array<SupervisedUser>} */ | 34 /** @private {!Array<SupervisedUser>} */ |
| 35 this.existingSupervisedUsers_ = []; | 35 this.existingSupervisedUsers_ = []; |
| 36 |
| 37 /** @private {boolean} */ |
| 38 this.allProfilesLocked_ = false; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 TestProfileBrowserProxy.prototype = { | 41 TestProfileBrowserProxy.prototype = { |
| 39 __proto__: settings.TestBrowserProxy.prototype, | 42 __proto__: settings.TestBrowserProxy.prototype, |
| 40 | 43 |
| 41 /** | 44 /** |
| 42 * @param {!Array<string>} iconUrls | 45 * @param {!Array<string>} iconUrls |
| 43 */ | 46 */ |
| 44 setIconUrls: function(iconUrls) { | 47 setIconUrls: function(iconUrls) { |
| 45 this.iconUrls_ = iconUrls; | 48 this.iconUrls_ = iconUrls; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 59 this.defaultProfileInfo_ = profileInfo; | 62 this.defaultProfileInfo_ = profileInfo; |
| 60 }, | 63 }, |
| 61 | 64 |
| 62 /** | 65 /** |
| 63 * @param {!Array<SupervisedUser>} supervisedUsers | 66 * @param {!Array<SupervisedUser>} supervisedUsers |
| 64 */ | 67 */ |
| 65 setExistingSupervisedUsers: function(supervisedUsers) { | 68 setExistingSupervisedUsers: function(supervisedUsers) { |
| 66 this.existingSupervisedUsers_ = supervisedUsers; | 69 this.existingSupervisedUsers_ = supervisedUsers; |
| 67 }, | 70 }, |
| 68 | 71 |
| 72 /** |
| 73 * @param {boolean} allProfilesLocked |
| 74 */ |
| 75 setAllProfilesLocked: function(allProfilesLocked) { |
| 76 this.allProfilesLocked_ = allProfilesLocked; |
| 77 }, |
| 78 |
| 69 /** @override */ | 79 /** @override */ |
| 70 getAvailableIcons: function() { | 80 getAvailableIcons: function() { |
| 71 this.methodCalled('getAvailableIcons'); | 81 this.methodCalled('getAvailableIcons'); |
| 72 cr.webUIListenerCallback('profile-icons-received', this.iconUrls_); | 82 cr.webUIListenerCallback('profile-icons-received', this.iconUrls_); |
| 73 cr.webUIListenerCallback('profile-defaults-received', | 83 cr.webUIListenerCallback('profile-defaults-received', |
| 74 this.defaultProfileInfo_); | 84 this.defaultProfileInfo_); |
| 75 }, | 85 }, |
| 76 | 86 |
| 77 /** @override */ | 87 /** @override */ |
| 78 getSignedInUsers: function() { | 88 getSignedInUsers: function() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 108 | 118 |
| 109 /** @override */ | 119 /** @override */ |
| 110 getExistingSupervisedUsers: function() { | 120 getExistingSupervisedUsers: function() { |
| 111 this.methodCalled('getExistingSupervisedUsers'); | 121 this.methodCalled('getExistingSupervisedUsers'); |
| 112 return Promise.resolve(this.existingSupervisedUsers_); | 122 return Promise.resolve(this.existingSupervisedUsers_); |
| 113 }, | 123 }, |
| 114 | 124 |
| 115 /** @override */ | 125 /** @override */ |
| 116 areAllProfilesLocked: function() { | 126 areAllProfilesLocked: function() { |
| 117 this.methodCalled('areAllProfilesLocked'); | 127 this.methodCalled('areAllProfilesLocked'); |
| 118 return Promise.resolve(false); | 128 return Promise.resolve(this.allProfilesLocked_); |
| 119 }, | 129 }, |
| 120 }; | 130 }; |
| OLD | NEW |