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

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

Issue 1585963004: Settings People Revamp: Add tests for ChromeOS Change Picture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 5fe931b3e17d7af1aa6931e1980dd019a396f92a..34343bf8804dfccae1796c120baec3464827d221 100644
--- a/chrome/browser/resources/settings/people_page/change_picture.js
+++ b/chrome/browser/resources/settings/people_page/change_picture.js
@@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+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
+ /**
+ * True if property changes should fire events for testing purposes.
+ * @type {boolean}
+ */
+ notifyPropertyChangesForTest: false,
+};
+
/**
* @fileoverview
* 'settings-change-picture' is the settings subpage containing controls to
@@ -22,7 +30,10 @@ Polymer({
* The currently selected profile image URL. May be a data URL.
* @private {string}
*/
- selectedImageUrl_: String,
+ selectedImageUrl_: {
+ type: String,
+ notify: changePictureOptions.notifyPropertyChangesForTest,
+ },
/**
* The url of the 'old' image, which is the existing image sourced from

Powered by Google App Engine
This is Rietveld 408576698