diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 17 | ||||
-rw-r--r-- | tests/test-glib-layout-client.c | 2 | ||||
-rw-r--r-- | tests/test-glib-properties-client.c | 2 | ||||
-rw-r--r-- | tests/test-gtk-label-client.c | 3 | ||||
-rw-r--r-- | tests/test-gtk-label.json | 77 |
5 files changed, 79 insertions, 22 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index fa85d7f..1d58700 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,5 @@ -DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf +DBUS_RUNNER=dbus-test-runner TESTS = \ test-glib-layout \ @@ -42,7 +42,7 @@ glib_server_nomenu_LDADD = \ test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ @chmod +x $@ test_glib_layout_server_SOURCES = \ @@ -76,7 +76,7 @@ test_glib_layout_client_LDADD = \ test-glib-properties: test-glib-properties-client test-glib-properties-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ @chmod +x $@ test_glib_properties_server_SOURCES = \ @@ -125,7 +125,7 @@ test_glib_simple_items_LDADD = \ test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ test_gtk_label_server_SOURCES = \ @@ -165,7 +165,7 @@ test_gtk_label_client_LDADD = \ test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ test_gtk_reorder_server_SOURCES = \ @@ -238,4 +238,9 @@ distclean-local: -rm -rf $(builddir)/mago.results DISTCLEANFILES = \ - $(TESTS) + $(TESTS) \ + test-glib-layout.bustle \ + test-glib-properties.bustle \ + test-glib-simple-items.bustle \ + test-gtk-label.bustle \ + test-gtk-reorder.bustle diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index a7dd683..6a79321 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -111,7 +111,7 @@ main (int argc, char ** argv) g_usleep(500000); - DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); + DbusmenuClient * client = dbusmenu_client_new(":1.1", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); g_timeout_add_seconds(10, timer_func, client); diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index 39815aa..9e257ea 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -155,7 +155,7 @@ main (int argc, char ** argv) /* 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(":1.1", "/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-gtk-label-client.c b/tests/test-gtk-label-client.c index 09325be..070c278 100644 --- a/tests/test-gtk-label-client.c +++ b/tests/test-gtk-label-client.c @@ -152,9 +152,11 @@ main (int argc, char ** argv) { gtk_init(&argc, &argv); + g_debug("Client Initialized. Waiting."); /* Make sure the server starts up and all that */ g_usleep(500000); + g_debug("Building Window"); GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget * menubar = gtk_menu_bar_new(); GtkWidget * menuitem = gtk_menu_item_new_with_label("Test"); @@ -168,6 +170,7 @@ main (int argc, char ** argv) death_timer = g_timeout_add_seconds(60, timer_func, window); + g_debug("Entering Mainloop"); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-gtk-label.json b/tests/test-gtk-label.json index 14584c3..464dc2d 100644 --- a/tests/test-gtk-label.json +++ b/tests/test-gtk-label.json @@ -205,43 +205,43 @@ "label": "value1", "submenu": [ {"id": 80, - "type": "imageitem", + "type": "menuitem", "icon": "face-angel", "label": "angel"}, {"id": 81, - "type": "imageitem", + "type": "menuitem", "icon": "face-angry", "label": "angry"}, {"id": 82, - "type": "imageitem", + "type": "menuitem", "icon": "face-cool", "label": "cool"}, {"id": 83, - "type":"imageitem", + "type":"menuitem", "icon": "face-devilish", "label": "devilish"}, {"id": 84, - "type": "imageitem", + "type": "menuitem", "icon": "face-embarrassed", "label": "embarrassed"}, {"id": 85, - "type": "imageitem", + "type": "menuitem", "icon": "face-kiss", "label": "kiss"}, {"id": 86, - "type": "imageitem", + "type": "menuitem", "icon": "face-laugh", "label": "laugh"}, {"id": 87, - "type": "imageitem", + "type": "menuitem", "icon": "face-monkey", "label": "monkey"}, {"id": 88, - "type": "imageitem", + "type": "menuitem", "icon": "face-sad", "label": "sad"}, {"id": 89, - "type": "imageitem", + "type": "menuitem", "icon": "face-sick", "label": "sick"} ] @@ -250,7 +250,7 @@ "label": "value1", "submenu": [ {"id": 90, - "type": "imageitem", + "type": "menuitem", "icon-data": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACPUlEQVR4nGJgoBAAAAAA///Ch1gW BzK0LQ5iaGNgYGDBpQgAAAD//8KpeY4/Q9+DCV7/H/S4/p8byDABlyEAAAAA///CqnluAMOEx5O8 @@ -266,7 +266,7 @@ Bi8YEIEIBwAAAAD//8JmAAcDA4MAlEYGPxgYGD5AaTgAAAAA//8DAD6xjTP5Y+A7AAAAAElFTkSu QmCC", "label": "up"}, {"id": 91, - "type": "imageitem", + "type": "menuitem", "icon-data": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACl0lEQVR4nGJgoBAAAAAA//9ixCLG sSWS4bs0B1QWip/+YGDwWcLAycDA8ANZMQAAAP//YsFigIA0JwODdvIsBob/fxgY/vxk+P/7OwPD @@ -283,7 +283,7 @@ AwODR18kw4UJ0QyX8WkGAAAA///ClpkYoAolGBgYFKBqHjAwMDxnYGD4ha4QAAAA///CZQDMEG4o +ys2zQwMDAwAAAAA//8DAAF5nhyE7tENAAAAAElFTkSuQmCC", "label": "down"}, {"id": 92, - "type": "imageitem", + "type": "menuitem", "icon": "up", "icon-data": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACl0lEQVR4nGJgoBAAAAAA//9ixCLG @@ -301,7 +301,7 @@ AwODR18kw4UJ0QyX8WkGAAAA///ClpkYoAolGBgYFKBqHjAwMDxnYGD4ha4QAAAA///CZQDMEG4o +ys2zQwMDAwAAAAA//8DAAF5nhyE7tENAAAAAElFTkSuQmCC", "label": "up"}, {"id": 93, - "type": "imageitem", + "type": "menuitem", "icon": "down", "icon-data": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACPUlEQVR4nGJgoBAAAAAA///Ch1gW @@ -319,4 +319,53 @@ QmCC", "label": "down"} ] }, + {"id": 1, "type": "menuitem", + "label": "value1", + "submenu": [ + {"id": 30, + "label": "No check (empty)", + "toggle-type": "none" + }, + {"id": 31, + "label": "No check (checked)", + "toggle-type": "none", + "toggle-checked": "checked" + }, + {"id": 32, + "label": "No check (????)", + "toggle-type": "none", + "toggle-checked": "indeterminate" + }, + {"id": 33, + "label": "Check (empty)", + "toggle-type": "checkbox", + "toggle-checked": "unchecked" + }, + {"id": 34, + "label": "Check (checked)", + "toggle-type": "checkbox", + "toggle-checked": "checked" + }, + {"id": 35, + "label": "Check (?????)", + "toggle-type": "checkbox", + "toggle-checked": "indeterminate" + }, + {"id": 36, + "label": "Radio (empty)", + "toggle-type": "radio", + "toggle-checked": "unchecked" + }, + {"id": 37, + "label": "Radio (checked)", + "toggle-type": "radio", + "toggle-checked": "checked" + }, + {"id": 38, + "label": "Radio (?????)", + "toggle-type": "radio", + "toggle-checked": "indeterminate" + } + ] + }, ] |