| Index: dbus/bus_unittest.cc
|
| diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
|
| index bbd2a4cf1c177aad93411fab5cef8bb2dac6f91b..8fa46de9243d22f88bc5a7607e3b0c01d882e647 100644
|
| --- a/dbus/bus_unittest.cc
|
| +++ b/dbus/bus_unittest.cc
|
| @@ -50,6 +50,32 @@ TEST(BusTest, GetObjectProxy) {
|
| bus->ShutdownAndBlock();
|
| }
|
|
|
| +TEST(BusTest, GetObjectProxyIgnoreUnknownService) {
|
| + dbus::Bus::Options options;
|
| + scoped_refptr<dbus::Bus> bus = new dbus::Bus(options);
|
| +
|
| + dbus::ObjectProxy* object_proxy1 =
|
| + bus->GetObjectProxyIgnoreUnknownService(
|
| + "org.chromium.TestService", "/org/chromium/TestObject");
|
| + ASSERT_TRUE(object_proxy1);
|
| +
|
| + // This should return the same object.
|
| + dbus::ObjectProxy* object_proxy2 =
|
| + bus->GetObjectProxyIgnoreUnknownService(
|
| + "org.chromium.TestService", "/org/chromium/TestObject");
|
| + ASSERT_TRUE(object_proxy2);
|
| + EXPECT_EQ(object_proxy1, object_proxy2);
|
| +
|
| + // This should not.
|
| + dbus::ObjectProxy* object_proxy3 =
|
| + bus->GetObjectProxyIgnoreUnknownService(
|
| + "org.chromium.TestService", "/org/chromium/DifferentTestObject");
|
| + ASSERT_TRUE(object_proxy3);
|
| + EXPECT_NE(object_proxy1, object_proxy3);
|
| +
|
| + bus->ShutdownAndBlock();
|
| +}
|
| +
|
| TEST(BusTest, GetExportedObject) {
|
| dbus::Bus::Options options;
|
| scoped_refptr<dbus::Bus> bus = new dbus::Bus(options);
|
|
|