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

Unified Diff: ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js

Issue 2624003003: WebUI: Add cr-policy-pref-indicator tests (Closed)
Patch Set: Fix closure Created 3 years, 10 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: ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js b/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
index 205465c71d740befa43794ae8a3c50975c69e8e6..63639392b7cec6c059630101f4aceb7a2d20ad3f 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js
@@ -48,11 +48,12 @@ var CrPolicyIndicatorBehavior = {
* @private
*/
getPolicyIndicatorIcon: function(type) {
- var icon = '';
+ var icon;
switch (type) {
case CrPolicyIndicatorType.EXTENSION:
case CrPolicyIndicatorType.NONE:
- return icon;
+ icon = 'domain'; // Set a valid icon for accessibility audit
michaelpg 2017/02/15 02:02:11 why does the accessibility audit care if the eleme
stevenjb 2017/02/15 02:23:29 Turns out we don't need this any more, so nevermin
+ break;
case CrPolicyIndicatorType.PRIMARY_USER:
icon = 'cr:group';
break;
@@ -66,12 +67,13 @@ var CrPolicyIndicatorBehavior = {
break;
default:
assertNotReached();
+ icon = ''; // For closure
}
return icon;
},
/**
- * @param {CrPolicyIndicatorType} type
+ * @param {!CrPolicyIndicatorType} type
* @param {string} name The name associated with the indicator. See
* chrome.settingsPrivate.PrefObject.controlledByName
* @param {boolean=} opt_matches For RECOMMENDED only, whether the indicator

Powered by Google App Engine
This is Rietveld 408576698