diff options
Diffstat (limited to 'dbus/end_to_end_async_unittest.cc')
-rw-r--r-- | dbus/end_to_end_async_unittest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc index f04f9a7..7d52130 100644 --- a/dbus/end_to_end_async_unittest.cc +++ b/dbus/end_to_end_async_unittest.cc @@ -234,3 +234,14 @@ TEST_F(EndToEndAsyncTest, TestSignal) { WaitForTestSignal(); ASSERT_EQ(kMessage, test_signal_string_); } + +TEST_F(EndToEndAsyncTest, TestSignalFromRoot) { + const char kMessage[] = "hello, world"; + // Send the test signal from the root object path, to see if we can + // handle signals sent from "/", like dbus-send does. + test_service_->SendTestSignalFromRoot(kMessage); + // Receive the signal with the object proxy. The signal is handled in + // EndToEndAsyncTest::OnTestSignal() in the main thread. + WaitForTestSignal(); + ASSERT_EQ(kMessage, test_signal_string_); +} |