From 6b9e39117fce4aef2a61d7287ae96c50de2544fb Mon Sep 17 00:00:00 2001 From: Alexander Hendrich Date: Wed, 22 Jun 2022 10:00:43 +0000 Subject: [PATCH] Remove unallowed ports from policy test PolicyPrefsTest.PolicyToPrefsMapping is currently disabled due to flakiness. One sub-test (see policy_test_cases.json) used the ExplicitlyAllowedNetworkPorts with a range of values, which are no longer valid (see https://crrev.com/c/3655041). This would cause the test to fail when re-enabling that test. Since no more values are actually valid for that policy, we will simply check the default case and the policy set to an empty list. The policy will remain in place for potential future use of the same functionality. BUG=1199642,1220079,1210779,1196846 Change-Id: I6f517a1ae2518f6088c7bd2faa3f221ae8b4b7ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714129 Auto-Submit: Alexander Hendrich Commit-Queue: Adam Rice Reviewed-by: Adam Rice Cr-Commit-Position: refs/heads/main@{#1016629} --- .../test/data/policy/policy_test_cases.json | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 5bc805109881d4..137d188c65e404 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json @@ -16911,18 +16911,23 @@ ], "policy_pref_mapping_tests": [ { + "note": "default value", + "policies": {}, + "prefs": { + "net.explicitly_allowed_network_ports": { + "default_value": [], + "location": "local_state" + } + } + }, + { + "note": "no ports are currently allowed to be blocked, but policy remains in place for potential future use", "policies": { - "ExplicitlyAllowedNetworkPorts": [ - "554", - "10080" - ] + "ExplicitlyAllowedNetworkPorts": [] }, "prefs": { "net.explicitly_allowed_network_ports": { - "value": [ - 554, - 10080 - ], + "value": [], "location": "local_state" } }