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

Unified Diff: chrome/test/data/policy/policy_test_cases.json

Issue 11096020: Add first batch of controlled setting indicators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment addressed. Created 8 years, 2 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/test/data/policy/policy_test_cases.json
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json
index ce4c5a5ee281fceb33a1f452493965d22db505c6..37bf0c7b5d76c08bcc185f80efed7aef2a968c12 100644
--- a/chrome/test/data/policy/policy_test_cases.json
+++ b/chrome/test/data/policy/policy_test_cases.json
@@ -3,7 +3,13 @@
"intro": "Top-level entries map a policy name to its test parameters, described below.",
"pref": "The pref that this policy maps to, if any.",
+ "can_be_recommended": "Whether a recommended value may be set for the policy. Defaults to |false| if not specified.",
"test_policy": "A policy dictionary that should trigger the managed banner in the settings UI. Usually just sets the current policy.",
+ "indicator_tests": [
+ "A list of test cases verifying that the controlled setting indicators for |pref| correctly indicate whether its value is recommended or enforced by a corresponding policy. Each test case is a dictionary with the following format:",
+ { "policy": "A policy dictionary that should affect |pref| when set as mandatory or recommended policy.",
+ "value": "The value that |pref| should take on. This must only be specified if |pref| has multiple controlled setting indicators, each corresponding to a specific value (e.g. indicators next to radio buttons).",
+ "readonly": "Whether setting the policy dictionary as recommended should cause |pref| to become read-only in the settings UI. This will be the case when the dictionary sets another policy that makes |pref| not applicable (e.g. setting 'homepage is NTP' makes the 'homepage URL' pref not applicable and read-only)."}],
"settings_pages": ["A list of settings pages where the banner should be visible when this policy is set."],
"os": ["List of operating systems that support this policy. Valid values:", "win", "linux", "mac", "chromeos"],
"local_state": "Optionally indicate that |pref| is registed in local state, instead of in the profile PrefService.",
@@ -12,14 +18,22 @@
"HomepageLocation": {
"pref": "homepage",
+ "can_be_recommended": true,
"test_policy": { "HomepageLocation": "http://chromium.org" },
+ "indicator_tests": [
+ { "policy": { "HomepageIsNewTabPage": false, "HomepageLocation": "http://chromium.org" }},
+ { "policy": { "HomepageIsNewTabPage": true, "HomepageLocation": "http://chromium.org" }, "readonly": true}],
"settings_pages": ["chrome://settings-frame/homePageOverlay"],
"os": ["win", "linux", "mac", "chromeos"]
},
"HomepageIsNewTabPage": {
"pref": "homepage_is_newtabpage",
+ "can_be_recommended": true,
"test_policy": { "HomepageIsNewTabPage": true },
+ "indicator_tests": [
+ { "policy": { "HomepageIsNewTabPage": false }, "value": "false"},
+ { "policy": { "HomepageIsNewTabPage": true }, "value": "true"}],
"settings_pages": ["chrome://settings-frame/homePageOverlay"],
"os": ["win", "linux", "mac", "chromeos"]
},

Powered by Google App Engine
This is Rietveld 408576698