Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: chrome/browser/resources/settings/people_page/change_picture.js

Issue 1871073004: Settings People Revamp: Simplify Change Picture browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0138-settings-people-manage-profile-browser-tests
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/people_page/change_picture.js
diff --git a/chrome/browser/resources/settings/people_page/change_picture.js b/chrome/browser/resources/settings/people_page/change_picture.js
index 57d0e24f8b57914b868ba88a94f4ff80f6171e96..0fff067897ebd7e6019ba21fcf8aee35f0c65bae 100644
--- a/chrome/browser/resources/settings/people_page/change_picture.js
+++ b/chrome/browser/resources/settings/people_page/change_picture.js
@@ -47,10 +47,7 @@ Polymer({
* and never directly assigned.
* @private {settings.ChangePictureImageElement}
*/
- selectedItem_: {
- type: settings.ChangePictureImageElement,
- notify: !!settings_test.changePictureNotifyForTest,
- },
+ selectedItem_: Object,
/**
* The url of the 'old' image, which is the existing image sourced from
@@ -87,10 +84,7 @@ Polymer({
* This may be null if the user started with the 'old' image.
* @private {?settings.ChangePictureImageElement}
*/
- fallbackImage_: {
- type: settings.ChangePictureImageElement,
- value: null,
- },
+ fallbackImage_: Object,
/**
* Type of the last selected icon. This is used to jump back to the camera
@@ -322,8 +316,7 @@ Polymer({
assert(this.defaultImages_.length > 0);
this.browserProxy_.selectDefaultImage(this.defaultImages_[0].url);
- announceAccessibleMessage(
- loadTimeData.getString('photoDiscardAccessibleText'));
+ announceAccessibleMessage(this.i18n('photoDiscardAccessibleText'));
},
/**
@@ -353,7 +346,7 @@ Polymer({
* @private
*/
isCameraActive_: function(cameraPresent, selectedItem) {
- return cameraPresent && selectedItem &&
+ return cameraPresent && selectedItem != null &&
selectedItem.dataset.type == 'camera';
},
@@ -372,7 +365,7 @@ Polymer({
* @private
*/
isAuthorCreditShown_: function(selectedItem) {
- return selectedItem && selectedItem.dataset.type == 'default';
+ return selectedItem != null && selectedItem.dataset.type == 'default';
},
/**

Powered by Google App Engine
This is Rietveld 408576698