Chromium Code Reviews| 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 7ba782ba54870e186c17e3ac3e1f01c67bc76c6b..8c4c07d5bc8b34cd30bcda654f7fd84a8842c760 100644 |
| --- a/dbus/end_to_end_async_unittest.cc |
| +++ b/dbus/end_to_end_async_unittest.cc |
| @@ -55,7 +55,8 @@ class EndToEndAsyncTest : public testing::Test { |
| "/org/chromium/TestObject"); |
| ASSERT_TRUE(bus_->HasDBusThread()); |
| - // Connect to the "Test" signal from the remote object. |
| + // Connect to the "Test" signal of "org.chromium.TestInterface" from |
| + // the remote object. |
| object_proxy_->ConnectToSignal( |
| "org.chromium.TestInterface", |
| "Test", |
| @@ -63,6 +64,18 @@ class EndToEndAsyncTest : public testing::Test { |
| base::Unretained(this)), |
| base::Bind(&EndToEndAsyncTest::OnConnected, |
| base::Unretained(this))); |
| + // Connect to the "Test2" signal of "org.chromium.TestInterface" from |
| + // the remote object. There was a bug where we were emitting error |
| + // messages like "Requested to remove an unknown match rule: ..." at |
| + // the shutdown of Bus when an object proxy is connected to more than |
| + // one signal of the same interface. See crosbug.com/23382 for details. |
| + object_proxy_->ConnectToSignal( |
| + "org.chromium.TestInterface", |
| + "Test2", |
| + base::Bind(&EndToEndAsyncTest::OnTest2Signal, |
| + base::Unretained(this)), |
| + base::Bind(&EndToEndAsyncTest::OnConnected, |
| + base::Unretained(this))); |
| // Wait until the object proxy is connected to the signal. |
| message_loop_.Run(); |
| } |
| @@ -122,6 +135,13 @@ class EndToEndAsyncTest : public testing::Test { |
| message_loop_.Quit(); |
| } |
| + // Called when the "Test2" signal is received, in the main thread. |
| + // Copy the string payload to |test_signal_string_|. |
|
stevenjb
2011/11/23 21:24:55
Copy comment invalid.
satorux1
2011/11/23 21:47:37
Done.
|
| + void OnTest2Signal(dbus::Signal* signal) { |
| + dbus::MessageReader reader(signal); |
| + message_loop_.Quit(); |
| + } |
| + |
| // Called when connected to the signal. |
| void OnConnected(const std::string& interface_name, |
| const std::string& signal_name, |