Commit 1930a326 authored by Alexander Hendrich's avatar Alexander Hendrich Committed by Commit Bot

Remove obsolete "test_policy" field

This CL is part of a larger refactoring/clean-up of
policy_test_cases.json.

The "test_policy" field used to be read by the code, but the value is
not used anywhere.

Bug: 1151251
Change-Id: I472e4daa552e1f276c4d1ec6b4da04c8670cb507
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552582
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830238}
parent 93325bd7
......@@ -344,7 +344,6 @@
"PrinterTypeDenyList": {
"os": ["win", "linux", "mac", "chromeos"],
"test_policy": { "PrinterTypeDenyList": ["privet", "extension"] },
"policy_pref_mapping_tests": [
{
"policies": { "PrinterTypeDenyList": [ "value1" ]},
......@@ -3738,7 +3737,6 @@
"ScrollToTextFragmentEnabled": {
"os": ["win", "linux", "mac", "chromeos", "android"],
"test_policy": { "ScrollToTextFragmentEnabled": true },
"policy_pref_mapping_tests": [
{
"policies": { "ScrollToTextFragmentEnabled": true },
......@@ -3778,7 +3776,6 @@
"GloballyScopeHTTPAuthCacheEnabled": {
"os": ["win", "linux", "mac", "chromeos", "android"],
"test_policy": { "GloballyScopeHTTPAuthCacheEnabled": true },
"policy_pref_mapping_tests": [
{
"policies": {
......@@ -3811,7 +3808,6 @@
"DNSInterceptionChecksEnabled": {
"os": ["chromeos", "linux", "mac", "win"],
"test_policy": { "DNSInterceptionChecksEnabled": false },
"policy_pref_mapping_tests": [
{
"policies": {
......@@ -3829,7 +3825,6 @@
"IntranetRedirectBehavior": {
"os": ["chromeos", "linux", "mac", "win"],
"test_policy": { "IntranetRedirectBehavior": 0 },
"policy_pref_mapping_tests": [
{
"policies": { "IntranetRedirectBehavior": 0 },
......@@ -5223,7 +5218,6 @@
"AmbientAuthenticationInPrivateModesEnabled":{
"os": ["win", "linux", "mac", "chromeos", "android"],
"test_policy":{"AmbientAuthenticationInPrivateModesEnabled": true},
"policy_pref_mapping_tests": [
{
"policies": {
......@@ -5440,7 +5434,6 @@
"ClickToCallEnabled" : {
"os": ["win", "linux", "mac", "chromeos"],
"test_policy": { "ClickToCallEnabled": false },
"policy_pref_mapping_tests": [
{
"policies": {
......@@ -5473,7 +5466,6 @@
"SuggestedContentEnabled": {
"os": ["chromeos"],
"test_policy": {"SuggestedContentEnabled": false },
"policy_pref_mapping_tests": [
{
"policies": {
......@@ -6434,7 +6426,6 @@
"DeviceCrostiniArcAdbSideloadingAllowed": {
"os": ["chromeos"],
"test_policy": { "DeviceCrostiniArcAdbSideloadingAllowed": 2 },
"policy_pref_mapping_tests": []
},
......
......@@ -233,10 +233,6 @@ class PolicyTestCase {
}
}
const base::Value* test_policy = test_case.FindDictKey("test_policy");
if (test_policy)
test_policy_ = test_policy->CreateDeepCopy();
const base::Value* policy_pref_mapping_tests =
test_case.FindListKey("policy_pref_mapping_tests");
if (policy_pref_mapping_tests) {
......@@ -285,8 +281,6 @@ class PolicyTestCase {
return IsOsSupported();
}
const base::Value* test_policy() const { return test_policy_.get(); }
const std::vector<std::unique_ptr<PolicyPrefMappingTest>>&
policy_pref_mapping_test() const {
return policy_pref_mapping_test_;
......@@ -297,7 +291,6 @@ class PolicyTestCase {
bool is_official_only_;
bool can_be_recommended_;
std::vector<std::string> supported_os_;
std::unique_ptr<base::Value> test_policy_;
std::vector<std::unique_ptr<PolicyPrefMappingTest>> policy_pref_mapping_test_;
};
......@@ -395,7 +388,7 @@ void VerifyAllPoliciesHaveATestCase(const base::FilePath& test_case_path) {
// This can only be a warning as many policies are not really testable
// this way and only present as a single line in the file.
// Although they could at least contain the "os" and "test_policy" fields.
// Although they could at least contain the "os" fields.
// See http://crbug.com/791125.
LOG_IF(WARNING, !has_test_case_for_this_os)
<< "Policy " << policy->first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment