+#if 0 /* Disabled: see https://bugzilla.gnome.org/show_bug.cgi?id=658999 */
+static void
+test_bogus_signal (GDBusProxy *proxy)
+{
+ GError *error = NULL;
+ GVariant *result;
+ GDBusInterfaceInfo *old_iface_info;
+
+ result = g_dbus_proxy_call_sync (proxy,
+ "EmitSignal2",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert (result != NULL);
+ g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
+ g_variant_unref (result);
+
+ if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
+ {
+ /* and now wait for the signal that will never arrive */
+ _g_assert_signal_received (proxy, "g-signal");
+ }
+ g_test_trap_assert_stderr ("*Dropping signal TestSignal2 of type (i) since the type from the expected interface is (u)*");
+ g_test_trap_assert_failed();
+
+ /* Our main branch will also do g_warning() when running the mainloop so
+ * temporarily remove the expected interface
+ */
+ old_iface_info = g_dbus_proxy_get_interface_info (proxy);
+ g_dbus_proxy_set_interface_info (proxy, NULL);
+ _g_assert_signal_received (proxy, "g-signal");
+ g_dbus_proxy_set_interface_info (proxy, old_iface_info);
+}
+
+static void
+test_bogus_property (GDBusProxy *proxy)
+{
+ GError *error = NULL;
+ GVariant *result;
+ GDBusInterfaceInfo *old_iface_info;
+
+ /* Make the service emit a PropertiesChanged signal for property 'i' of type 'i' - since
+ * our introspection data has this as type 'u' we should get a warning on stderr.
+ */
+ result = g_dbus_proxy_call_sync (proxy,
+ "FrobSetProperty",
+ g_variant_new ("(sv)",
+ "i", g_variant_new_int32 (42)),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert (result != NULL);
+ g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
+ g_variant_unref (result);
+
+ if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
+ {
+ /* and now wait for the signal that will never arrive */
+ _g_assert_signal_received (proxy, "g-properties-changed");
+ }
+ g_test_trap_assert_stderr ("*Received property i with type i does not match expected type u in the expected interface*");
+ g_test_trap_assert_failed();
+
+ /* Our main branch will also do g_warning() when running the mainloop so
+ * temporarily remove the expected interface
+ */
+ old_iface_info = g_dbus_proxy_get_interface_info (proxy);
+ g_dbus_proxy_set_interface_info (proxy, NULL);
+ _g_assert_signal_received (proxy, "g-properties-changed");
+ g_dbus_proxy_set_interface_info (proxy, old_iface_info);
+}
+#endif /* Disabled: see https://bugzilla.gnome.org/show_bug.cgi?id=658999 */
+