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 var changePictureOptions = changePictureOptions || { | |
dpapad
2016/01/19 19:44:59
Is there a way we can avoid this global variable?
tommycli
2016/01/20 00:30:27
I could not figure out an alternative. I followed
dpapad
2016/01/20 01:09:29
Two ways I can think of.
1) Don't test that the UR
tommycli
2016/01/20 22:38:12
Done.
Okay cool! i was able to namespace it to se
| |
6 /** | |
7 * True if property changes should fire events for testing purposes. | |
8 * @type {boolean} | |
9 */ | |
10 notifyPropertyChangesForTest: false, | |
11 }; | |
12 | |
5 /** | 13 /** |
6 * @fileoverview | 14 * @fileoverview |
7 * 'settings-change-picture' is the settings subpage containing controls to | 15 * 'settings-change-picture' is the settings subpage containing controls to |
8 * edit a ChromeOS user's picture. | 16 * edit a ChromeOS user's picture. |
9 * | 17 * |
10 * @group Chrome Settings Elements | 18 * @group Chrome Settings Elements |
11 * @element settings-change-picture | 19 * @element settings-change-picture |
12 */ | 20 */ |
13 Polymer({ | 21 Polymer({ |
14 is: 'settings-change-picture', | 22 is: 'settings-change-picture', |
15 | 23 |
16 behaviors: [ | 24 behaviors: [ |
17 I18nBehavior, | 25 I18nBehavior, |
18 ], | 26 ], |
19 | 27 |
20 properties: { | 28 properties: { |
21 /** | 29 /** |
22 * The currently selected profile image URL. May be a data URL. | 30 * The currently selected profile image URL. May be a data URL. |
23 * @private {string} | 31 * @private {string} |
24 */ | 32 */ |
25 selectedImageUrl_: String, | 33 selectedImageUrl_: { |
34 type: String, | |
35 notify: changePictureOptions.notifyPropertyChangesForTest, | |
36 }, | |
26 | 37 |
27 /** | 38 /** |
28 * The url of the 'old' image, which is the existing image sourced from | 39 * The url of the 'old' image, which is the existing image sourced from |
29 * the camera, a file, or a deprecated default image. | 40 * the camera, a file, or a deprecated default image. |
30 * @private {string} | 41 * @private {string} |
31 */ | 42 */ |
32 oldImageUrl_: String, | 43 oldImageUrl_: String, |
33 | 44 |
34 /** | 45 /** |
35 * The url of the profile image. | 46 * The url of the profile image. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 * Computed binding determining which profile image button is toggled on. | 170 * Computed binding determining which profile image button is toggled on. |
160 * @private | 171 * @private |
161 * @param {string} imageUrl | 172 * @param {string} imageUrl |
162 * @param {string} selectedImageUrl | 173 * @param {string} selectedImageUrl |
163 * @return {boolean} | 174 * @return {boolean} |
164 */ | 175 */ |
165 isActiveImage_: function(imageUrl, selectedImageUrl) { | 176 isActiveImage_: function(imageUrl, selectedImageUrl) { |
166 return imageUrl == selectedImageUrl; | 177 return imageUrl == selectedImageUrl; |
167 }, | 178 }, |
168 }); | 179 }); |
OLD | NEW |