diff options
author | avakulenko <avakulenko@chromium.org> | 2014-09-16 18:44:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-17 01:44:53 +0000 |
commit | 6b571de0807eea51c863cf0aa18403ae6c18ba65 (patch) | |
tree | 31d20540dc3e95b257946a3a7f73d2eee150dbed /dbus/mock_object_proxy.h | |
parent | 77f095322ddd708a4a56f2554642e74910e4983e (diff) | |
download | chromium_src-6b571de0807eea51c863cf0aa18403ae6c18ba65.zip chromium_src-6b571de0807eea51c863cf0aa18403ae6c18ba65.tar.gz chromium_src-6b571de0807eea51c863cf0aa18403ae6c18ba65.tar.bz2 |
Add ObjectProxy::CallMethodAndBlockWithErrorDetails methods
Currently, ObjectProxy::CallMethodAndBlock() returns NULL on
failure but the D-Bus error details are not passed to the caller.
Added a method that would return the D-Bus error information
to the caller and switched ObjectProxy::CallMethodAndBlock()
to use the new method instead.
BUG=chromium:414838
TEST=Build Chrome
TEST=ninja -C out/Debug dbus_unittests && out/Debug/dbus_unittests
Review URL: https://codereview.chromium.org/563763004
Cr-Commit-Position: refs/heads/master@{#295212}
Diffstat (limited to 'dbus/mock_object_proxy.h')
-rw-r--r-- | dbus/mock_object_proxy.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dbus/mock_object_proxy.h b/dbus/mock_object_proxy.h index fcad860..b5900ad 100644 --- a/dbus/mock_object_proxy.h +++ b/dbus/mock_object_proxy.h @@ -25,6 +25,17 @@ class MockObjectProxy : public ObjectProxy { // uncopyable. This is a workaround which defines |MockCallMethodAndBlock| as // a mock method and makes |CallMethodAndBlock| call the mocked method. // Use |MockCallMethodAndBlock| for setting/testing expectations. + MOCK_METHOD3(MockCallMethodAndBlockWithErrorDetails, + Response*(MethodCall* method_call, + int timeout_ms, + ScopedDBusError* error)); + virtual scoped_ptr<Response> CallMethodAndBlockWithErrorDetails( + MethodCall* method_call, + int timeout_ms, + ScopedDBusError* error) OVERRIDE { + return scoped_ptr<Response>( + MockCallMethodAndBlockWithErrorDetails(method_call, timeout_ms, error)); + } MOCK_METHOD2(MockCallMethodAndBlock, Response*(MethodCall* method_call, int timeout_ms)); virtual scoped_ptr<Response> CallMethodAndBlock(MethodCall* method_call, |