New issue
Advanced search Search tips

Issue 870106 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 844029
Owner: ----
Closed: Aug 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Missing Settings tests for policy test cases

Project Member Reported by michae...@chromium.org, Aug 2

Issue description

Policy test cases have 2 main purposes:
1. verify the policy affects the pref
2. verify the UI reflects the policy

The UI verification (2) was apparently removed some time ago, but the test cases and some unused code are still there.

Policy test cases are specified in policy_test_cases.json[1]. Each policy can include pref mappings and specify how their controlled setting indicators should be tested. These fields are now read, but unused:
* indicator_test_url (used to default to chrome://settings-frame)
* indicator_tests
* indicator_test_setup_js
* indicator_selector

PolicyPrefsTest is the base class that executes the tests from this JSON, but it now has a lot of unused code. It reads the fields mentioned above, but doesn't do anything with that information. The indicators are not tested. IndicatorTestCases are created, but unused.

The test code that used these fields and tested the old Options page was removed in https://chromium-review.googlesource.com/c/chromium/src/+/583935.

Was this intentional? Do we want to remove the indicator fields from policy_test_cases.json, or do we want to write new code to test these indicators in the new MD Settings page?

We do have unit tests for the MD policy indicator elements. These don't actually test the policies in policy_test_cases.json; they just create a fake policy and an indicator, and verify that the indicator reflects the policy. Maybe that's enough?
 
Duplicate of issue 844029 ?
Mergedinto: 844029
Status: Duplicate (was: Untriaged)
Yep, sorry my search-fu failed me!

Sign in to add a comment