Adding unit tests for MinimumVersionPolicyHandler
Adding delegate in the policy handler to take care of the external dependencies. This CL adds 2 unit tests for MinimumVersionPolicyHandler. The test RequirementsNotMetState verifies that when policy contains a requirement with version greater than current version, then the state in the policy handler is set to the strongest requirement among those. The strongest requirement is defined in the policy description. The test RequirementsMetState verifies that if the current version satisfies all the requirements in the policy, then there is no change in the state in the policy handler. The keys in the policy schema have been moved to the header file so that they can be reused in the unit test without duplication. Bug: 1048607 Change-Id: I59625dd1c16e7097b814cb85f93de6ee2a3f87c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044116Reviewed-by:Denis Kuznetsov [CET] <antrim@chromium.org> Commit-Queue: Saurabh Nijhara <snijhara@google.com> Cr-Commit-Position: refs/heads/master@{#744722}
Showing
Please register or sign in to comment