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 {TestBrowserProxy} |
11 */ | 11 */ |
12 var TestProfileBrowserProxy = function() { | 12 var TestProfileBrowserProxy = function() { |
13 settings.TestBrowserProxy.call(this, [ | 13 TestBrowserProxy.call(this, [ |
14 'getAvailableIcons', | 14 'getAvailableIcons', |
15 'getSignedInUsers', | 15 'getSignedInUsers', |
16 'launchGuestUser', | 16 'launchGuestUser', |
17 'createProfile', | 17 'createProfile', |
18 'cancelCreateProfile', | 18 'cancelCreateProfile', |
19 'initializeUserManager', | 19 'initializeUserManager', |
20 'launchUser', | 20 'launchUser', |
21 'getExistingSupervisedUsers', | 21 'getExistingSupervisedUsers', |
22 'areAllProfilesLocked', | 22 'areAllProfilesLocked', |
23 ]); | 23 ]); |
24 | 24 |
25 /** @private {!Array<!AvatarIcon>} */ | 25 /** @private {!Array<!AvatarIcon>} */ |
26 this.icons_ = []; | 26 this.icons_ = []; |
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 | 36 |
37 /** @private {boolean} */ | 37 /** @private {boolean} */ |
38 this.allProfilesLocked_ = false; | 38 this.allProfilesLocked_ = false; |
39 }; | 39 }; |
40 | 40 |
41 TestProfileBrowserProxy.prototype = { | 41 TestProfileBrowserProxy.prototype = { |
42 __proto__: settings.TestBrowserProxy.prototype, | 42 __proto__: TestBrowserProxy.prototype, |
43 | 43 |
44 /** | 44 /** |
45 * @param {!Array<!AvatarIcon>} icons | 45 * @param {!Array<!AvatarIcon>} icons |
46 */ | 46 */ |
47 setIcons: function(icons) { | 47 setIcons: function(icons) { |
48 this.icons_ = icons; | 48 this.icons_ = icons; |
49 }, | 49 }, |
50 | 50 |
51 /** | 51 /** |
52 * @param {!Array<SignedInUser>} signedInUsers | 52 * @param {!Array<SignedInUser>} signedInUsers |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 this.methodCalled('getExistingSupervisedUsers'); | 122 this.methodCalled('getExistingSupervisedUsers'); |
123 return Promise.resolve(this.existingSupervisedUsers_); | 123 return Promise.resolve(this.existingSupervisedUsers_); |
124 }, | 124 }, |
125 | 125 |
126 /** @override */ | 126 /** @override */ |
127 areAllProfilesLocked: function() { | 127 areAllProfilesLocked: function() { |
128 this.methodCalled('areAllProfilesLocked'); | 128 this.methodCalled('areAllProfilesLocked'); |
129 return Promise.resolve(this.allProfilesLocked_); | 129 return Promise.resolve(this.allProfilesLocked_); |
130 }, | 130 }, |
131 }; | 131 }; |
OLD | NEW |