diff options
author | Olli Salli <ollisal@gmail.com> | 2011-04-07 18:40:07 +0300 |
---|---|---|
committer | Olli Salli <ollisal@gmail.com> | 2011-04-11 20:03:59 +0300 |
commit | f6a169db0c31f64ef5ba953d0e1cabd325ea3e10 (patch) | |
tree | 0facb559e159b4c87f4cb08721355f4706b16c63 /tests | |
parent | fd5f43f9d76f11593d026bd87396ce6265cc1b99 (diff) |
bug16307-conn.c: Intentionally break Connection properties implementation
Otherwise the fast-path will be hit, and TpConnection never calls GetStatus which this test is
supposed to simulate being returned to at a certain moment.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/bug16307-conn.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/bug16307-conn.c b/tests/lib/bug16307-conn.c index fbad5195..94c8368b 100644 --- a/tests/lib/bug16307-conn.c +++ b/tests/lib/bug16307-conn.c @@ -150,6 +150,10 @@ tp_tests_bug16307_connection_class_init (TpTestsBug16307ConnectionClass *klass) TP_IFACE_CONNECTION_INTERFACE_PRESENCE, TP_IFACE_CONNECTION_INTERFACE_AVATARS, NULL }; + static TpDBusPropertiesMixinPropImpl connection_properties[] = { + { "Status", "dbus-status-except-i-broke-it", NULL }, + { NULL } + }; object_class->finalize = finalize; g_type_class_add_private (klass, sizeof (TpTestsBug16307ConnectionPrivate)); @@ -165,6 +169,13 @@ tp_tests_bug16307_connection_class_init (TpTestsBug16307ConnectionClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + /* break the Connection D-Bus properties implementation, so that we always + * cause the slower introspection codepath (the one that actually calls + * GetStatus) in TpConnection to be invoked */ + tp_dbus_properties_mixin_implement_interface (object_class, + TP_IFACE_QUARK_CONNECTION, + NULL, NULL, connection_properties); } /** |