-
Ryo Hashimoto authored
Currently, ObjectProxy::CallMethod is implemented by creating ErrorCallback from ResponseCallback. This does not work with OnceCallback because it's not allowed to create two callbacks from one OnceCallback. To solve this, this change introduces CallMethodCallbackInternal to ObjectProxy which takes either Response* or ErrorResponse*, and dispatches the response to the appropriate callback. Also, Gmock does not allow directly mocking functions which take move-only arguments. https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md#mocking-methods-that-use-move-only-types To workaround this, add DoCallMethod to MockObjetProxy. BUG=740015 TEST=build Change-Id: I1a98b5fd1d6d70f69674102a3d66bcec0c13214c Reviewed-on: https://chromium-review.googlesource.com/578541 Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Reviewed-by: Satoru Takabayashi <satorux@chromium.org> Cr-Commit-Position: refs/heads/master@{#488615}
2a363a8c