aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-glib-proxy-client.c5
-rw-r--r--tests/test-glib-proxy-server.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/test-glib-proxy-client.c b/tests/test-glib-proxy-client.c
index 434465a..7e3541a 100644
--- a/tests/test-glib-proxy-client.c
+++ b/tests/test-glib-proxy-client.c
@@ -154,10 +154,7 @@ main (int argc, char ** argv)
{
g_type_init();
- /* Make sure the server starts up and all that */
- g_usleep(500000);
-
- DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test");
+ DbusmenuClient * client = dbusmenu_client_new("test.proxy.first_proxy", "/org/test");
g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL);
death_timer = g_timeout_add_seconds(10, timer_func, client);
diff --git a/tests/test-glib-proxy-server.c b/tests/test-glib-proxy-server.c
index 091e550..2869bfe 100644
--- a/tests/test-glib-proxy-server.c
+++ b/tests/test-glib-proxy-server.c
@@ -93,6 +93,19 @@ main (int argc, char ** argv)
g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
+ DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+ guint nameret = 0;
+
+ if (!org_freedesktop_DBus_request_name(bus_proxy, "test.proxy.server", 0, &nameret, &error)) {
+ g_error("Unable to call to request name");
+ return 1;
+ }
+
+ if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ g_error("Unable to get name");
+ return 1;
+ }
+
server = dbusmenu_server_new("/org/test");
timer_func(NULL);