Generalize ScopedXPCUpdateServiceMock to ScopedXPCServiceMock.
It now takes an XPC protocol as a parameter and mocks the service specified. Some type safety is lost in the process, since I had to convert id<P> to raw id in a few spots; I spend a while trying to figure out how to do this with templates and concluded that I probably couldn't (because C++ does not understand an Objective-C protocol, since it is completely outside the C++ type system), and figured the unchecked type is tolerable in test code. Bug: 1055876 Change-Id: I2fe5684b34b64245f6d9fe7716c9bdf7cd97c76e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231703Reviewed-by:Sorin Jianu <sorin@chromium.org> Reviewed-by:
Robert Sesek <rsesek@chromium.org> Commit-Queue: Adam Norberg <norberg@google.com> Cr-Commit-Position: refs/heads/master@{#776576}
Showing
Please register or sign in to comment