| Index: dbus/end_to_end_async_unittest.cc
|
| diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc
|
| index 7d52130b954190904461701979f2edc7ea5982ee..7ba782ba54870e186c17e3ac3e1f01c67bc76c6b 100644
|
| --- a/dbus/end_to_end_async_unittest.cc
|
| +++ b/dbus/end_to_end_async_unittest.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop.h"
|
| #include "base/stl_util.h"
|
| +#include "base/test/test_timeouts.h"
|
| #include "base/threading/thread.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "dbus/bus.h"
|
| @@ -225,6 +226,28 @@ TEST_F(EndToEndAsyncTest, BrokenMethod) {
|
| ASSERT_EQ("", response_strings_[0]);
|
| }
|
|
|
| +TEST_F(EndToEndAsyncTest, EmptyResponseCallback) {
|
| + const char* kHello = "hello";
|
| +
|
| + // Create the method call.
|
| + dbus::MethodCall method_call("org.chromium.TestInterface", "Echo");
|
| + dbus::MessageWriter writer(&method_call);
|
| + writer.AppendString(kHello);
|
| +
|
| + // Call the method with an empty callback.
|
| + const int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT;
|
| + object_proxy_->CallMethod(&method_call,
|
| + timeout_ms,
|
| + dbus::ObjectProxy::EmptyResponseCallback());
|
| + // Post a delayed task to quit the message loop.
|
| + message_loop_.PostDelayedTask(FROM_HERE,
|
| + MessageLoop::QuitClosure(),
|
| + TestTimeouts::tiny_timeout_ms());
|
| + message_loop_.Run();
|
| + // We cannot tell if the empty callback is called, but at least we can
|
| + // check if the test does not crash.
|
| +}
|
| +
|
| TEST_F(EndToEndAsyncTest, TestSignal) {
|
| const char kMessage[] = "hello, world";
|
| // Send the test signal from the exported object.
|
|
|