shill: Service: Remove duplicate OnPropertyChanged calls
This CL unravels a small mystery about the OnPropertyChanged calls
in shill Service objects. In the very elegantly written CL
https://gerrit.chromium.org/gerrit/49733, the property store
invokes a callback in its owner (in this case the Service) to
notify it when properties have been changed in a non-trivial
manner, filtering out no-op changes.
However, this CL failed to remove all previous methods for doing
so, e.g., https://gerrit.chromium.org/gerrit/37304. This caused
Service::Configure calls to invoke OnPropertyChanged twice for
non-trivial changes and once for trivial calls.
This CL cleans up the redundant calls and adds a unit test that
mocks the OnPropertyChanged method in the ServiceUnderTest to
assure that Configure calls work correctly in this respect.
BUG=chromium:364298
TEST=New unit test
Change-Id: I0dbb515ef640f0f90a25398741d80c039678f6f7
Reviewed-on: https://chromium-review.googlesource.com/196730
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2 files changed