Support a test which modifies and tests device policies, now that issue 651249 has been fixed.
Open problems:
- a device that is already enrolled (due to test failure) or has already been owned by a fake user. Maybe we need clear-tpm requests with reboot post-test or maybe we need to wrap tests in a generic clearTPM server test, which also reboots
- device policy names in fake dms do not match their policy name as listed in chrome://policy, which breaks how we verify policies right now
Changes needed:
- pass device policies into the fake-dms policy blob, similarly to how users policies are passed now. See chrome_device_settings.proto
- remove concept "policy under test" (so that we don't have to have a million additional flags to determine if the policy is device/user or mandatory/suggested). With this gone, fix verification to check all policies
- add an actual test which sets a device policy
- test this new test under these conditions: device already managed (real account), device already managed (fake user), device owned (real user), device owned (fake user)
Comment 1 by bugdroid1@chromium.org
, Nov 1 2017