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

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..ff7ce41438f0aa9594dba27e1d8ab30920e4a139 100644
--- a/chrome/browser/resources/settings/people_page/change_picture.js
+++ b/chrome/browser/resources/settings/people_page/change_picture.js
@@ -49,7 +49,7 @@ Polymer({
*/
selectedItem_: {
dpapad 2016/04/09 00:16:35 Shouldn't this be /** * @private {settings.Cha
tommycli 2016/04/11 19:09:57 Done. Yes I think you are correct. I wonder what i
type: settings.ChangePictureImageElement,
- notify: !!settings_test.changePictureNotifyForTest,
+ value: null,
},
/**
@@ -322,8 +322,7 @@ Polymer({
assert(this.defaultImages_.length > 0);
this.browserProxy_.selectDefaultImage(this.defaultImages_[0].url);
- announceAccessibleMessage(
- loadTimeData.getString('photoDiscardAccessibleText'));
+ announceAccessibleMessage(this.i18n('photoDiscardAccessibleText'));
},
/**
@@ -353,7 +352,7 @@ Polymer({
* @private
*/
isCameraActive_: function(cameraPresent, selectedItem) {
- return cameraPresent && selectedItem &&
+ return cameraPresent && selectedItem != null &&
dpapad 2016/04/09 00:16:35 Nit (optional): Use "!==" instead of "!=".
tommycli 2016/04/11 19:09:57 This didn't work for me because even with the valu
dpapad 2016/04/11 19:36:38 That is odd. Polymer data bindings guarantee that
tommycli 2016/04/11 21:20:52 I investigated this in detail. Basically: when iro
dpapad 2016/04/11 21:29:33 Thanks for investigating!
selectedItem.dataset.type == 'camera';
},
@@ -372,7 +371,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