DescriptionRemoving FakePolicyWatcher and introducing FakeAsyncPolicyLoader.
Removal of FakePolicyWatcher means that PolicyServiceWatcher is now the only
class derived from PolicyWatcher. A next check-in should merge PolicyWatcher
and PolicyServiceWatcher into a single class.
Testing via FakeAsyncPolicyLoader rather than FakePolicyWatcher means that
tests cover more of PolicyServiceWatcher code.
I chose to introduce FakeAsyncPolicyLoader, rather than going via an already
existing MockConfigurationPolicyProvier, because 1) this way I can cover more
of PolicyServiceWatcher code and 2) this simplifies the test code (by a) keeping
PolicySchema manipulation within the product code and b) not requiring mocking
of IsInitializationComplete and c) being able to directly call into unmodified
CreateFromPolicyLoader method in the product code).
BUG=368321
Committed: https://crrev.com/56dd1e9481b2a7cdb8fd2067046e452bb765ffa4
Cr-Commit-Position: refs/heads/master@{#312994}
Patch Set 1 #
Total comments: 20
Patch Set 2 : Addressed code review feedback from Mattias. #
Total comments: 6
Patch Set 3 : Tweaked the set of #include-s. #
Total comments: 12
Patch Set 4 : Addressed code review feedback from Sergey. #Patch Set 5 : Removed fake_async_policy_loader.cc/.h from Android builds. #Patch Set 6 : Fixed a memory leak in policy_watcher_unittest.cc #Patch Set 7 : Rebasing... #Messages
Total messages: 20 (5 generated)
|