aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-06 10:17:44 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-01-06 10:17:44 -0500
commit9d5b3b0e989c12c8ed600272aa895390b277c0dc (patch)
tree8e415a8e7136d6e135ec88d6cd186f1ae04e35e2 /tests
parent54c9e642092a203b35f63acf915eef78d2cb1ef0 (diff)
parent2437d4ba20b168534165456ed0ed989a9f5f2695 (diff)
downloadlibayatana-appindicator-9d5b3b0e989c12c8ed600272aa895390b277c0dc.tar.gz
libayatana-appindicator-9d5b3b0e989c12c8ed600272aa895390b277c0dc.tar.bz2
libayatana-appindicator-9d5b3b0e989c12c8ed600272aa895390b277c0dc.zip
* Merged changes from ~ubuntu-desktop package
* Intial release. * debian/rules - Changes to build targets to get it building multipass for python 2.6 and 2.7
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am66
-rw-r--r--tests/Makefile.in138
-rw-r--r--tests/test-approver.c179
-rw-r--r--tests/test-libappindicator-dbus-client.c16
-rw-r--r--tests/test-libappindicator-dbus-server.c4
-rw-r--r--tests/test-libappindicator.c126
-rw-r--r--tests/test-libappindicator.desktop23
7 files changed, 225 insertions, 327 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f2bdbb2..5e176b5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,5 @@
check_PROGRAMS = \
- test-approver \
test-libappindicator \
test-libappindicator-dbus-client \
test-libappindicator-dbus-server \
@@ -13,7 +12,9 @@ check_PROGRAMS = \
TESTS =
DISTCLEANFILES = $(TESTS)
-EXTRA_DIST = run-xvfb.sh
+EXTRA_DIST = \
+ run-xvfb.sh \
+ test-libappindicator.desktop
#########################################
## test-libappindicator
@@ -23,12 +24,13 @@ test_libappindicator_SOURCES = \
test-libappindicator.c
test_libappindicator_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
+ -DSRCDIR="\"$(srcdir)\"" \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
#########################################
@@ -40,12 +42,12 @@ test_libappindicator_dbus_client_SOURCES = \
test-libappindicator-dbus-client.c
test_libappindicator_dbus_client_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_dbus_client_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
#########################################
@@ -57,12 +59,12 @@ test_libappindicator_dbus_server_SOURCES = \
test-libappindicator-dbus-server.c
test_libappindicator_dbus_server_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_dbus_server_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
#########################################
@@ -74,12 +76,12 @@ test_libappindicator_status_client_SOURCES = \
test-libappindicator-status-client.c
test_libappindicator_status_client_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_status_client_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
#########################################
@@ -91,42 +93,15 @@ test_libappindicator_status_server_SOURCES = \
test-libappindicator-status-server.c
test_libappindicator_status_server_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_status_server_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
#########################################
-## test-approver
-#########################################
-
-test_approver_SOURCES = \
- test-approver.c
-
-test_approver_CFLAGS = \
- $(INDICATOR_CFLAGS) \
- -Wall -Werror \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src
-
-test_approver_LDADD = \
- $(INDICATOR_LIBS) \
- $(top_builddir)/src/libappindicator.la
-
-test-approver-tester: test-approver Makefile.am
- @echo "#!/bin/bash" > $@
- @echo export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=1000 >> $@
- @echo . $(srcdir)/run-xvfb.sh >> $@
- @echo $(DBUS_RUNNER) --task $(builddir)/test-approver --task-name Approver --task $(top_builddir)/src/indicator-application-service --task-name Service --ignore-return >> $@
- @chmod +x $@
-
-TESTS += test-approver-tester
-
-
-#########################################
## test-libappindicator-fallback
#########################################
@@ -134,24 +109,24 @@ test_libappindicator_fallback_watcher_SOURCES = \
test-libappindicator-fallback-watcher.c
test_libappindicator_fallback_watcher_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_fallback_watcher_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
test_libappindicator_fallback_item_SOURCES = \
test-libappindicator-fallback-item.c
test_libappindicator_fallback_item_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_fallback_item_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am
@@ -193,6 +168,7 @@ test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator
@chmod +x test-libappindicator-dbus
TESTS += test-libappindicator-dbus
+XFAIL_TESTS = test-libappindicator-dbus
test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am
@echo "#!/bin/bash" > test-libappindicator-status
@@ -210,11 +186,11 @@ test_simple_app_SOURCES = \
test-simple-app.c
test_simple_app_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_simple_app_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 8594e87..13a2958 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -33,7 +33,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-check_PROGRAMS = test-approver$(EXEEXT) test-libappindicator$(EXEEXT) \
+check_PROGRAMS = test-libappindicator$(EXEEXT) \
test-libappindicator-dbus-client$(EXEEXT) \
test-libappindicator-dbus-server$(EXEEXT) \
test-libappindicator-status-client$(EXEEXT) \
@@ -55,22 +55,15 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am_test_approver_OBJECTS = test_approver-test-approver.$(OBJEXT)
-test_approver_OBJECTS = $(am_test_approver_OBJECTS)
-am__DEPENDENCIES_1 =
-test_approver_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/libappindicator.la
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-test_approver_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_approver_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
am_test_libappindicator_OBJECTS = \
test_libappindicator-test-libappindicator.$(OBJEXT)
test_libappindicator_OBJECTS = $(am_test_libappindicator_OBJECTS)
+am__DEPENDENCIES_1 =
test_libappindicator_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
test_libappindicator_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_libappindicator_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -79,7 +72,7 @@ am_test_libappindicator_dbus_client_OBJECTS = test_libappindicator_dbus_client-t
test_libappindicator_dbus_client_OBJECTS = \
$(am_test_libappindicator_dbus_client_OBJECTS)
test_libappindicator_dbus_client_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
test_libappindicator_dbus_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_libappindicator_dbus_client_CFLAGS) $(CFLAGS) \
@@ -88,7 +81,7 @@ am_test_libappindicator_dbus_server_OBJECTS = test_libappindicator_dbus_server-t
test_libappindicator_dbus_server_OBJECTS = \
$(am_test_libappindicator_dbus_server_OBJECTS)
test_libappindicator_dbus_server_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
test_libappindicator_dbus_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_libappindicator_dbus_server_CFLAGS) $(CFLAGS) \
@@ -97,7 +90,8 @@ am_test_libappindicator_fallback_item_OBJECTS = test_libappindicator_fallback_it
test_libappindicator_fallback_item_OBJECTS = \
$(am_test_libappindicator_fallback_item_OBJECTS)
test_libappindicator_fallback_item_DEPENDENCIES = \
- $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libappindicator.la
test_libappindicator_fallback_item_LINK = $(LIBTOOL) $(AM_V_lt) \
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(test_libappindicator_fallback_item_CFLAGS) $(CFLAGS) \
@@ -106,7 +100,8 @@ am_test_libappindicator_fallback_watcher_OBJECTS = test_libappindicator_fallback
test_libappindicator_fallback_watcher_OBJECTS = \
$(am_test_libappindicator_fallback_watcher_OBJECTS)
test_libappindicator_fallback_watcher_DEPENDENCIES = \
- $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libappindicator.la
test_libappindicator_fallback_watcher_LINK = $(LIBTOOL) $(AM_V_lt) \
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(test_libappindicator_fallback_watcher_CFLAGS) \
@@ -115,7 +110,8 @@ am_test_libappindicator_status_client_OBJECTS = test_libappindicator_status_clie
test_libappindicator_status_client_OBJECTS = \
$(am_test_libappindicator_status_client_OBJECTS)
test_libappindicator_status_client_DEPENDENCIES = \
- $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libappindicator.la
test_libappindicator_status_client_LINK = $(LIBTOOL) $(AM_V_lt) \
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(test_libappindicator_status_client_CFLAGS) $(CFLAGS) \
@@ -124,7 +120,8 @@ am_test_libappindicator_status_server_OBJECTS = test_libappindicator_status_serv
test_libappindicator_status_server_OBJECTS = \
$(am_test_libappindicator_status_server_OBJECTS)
test_libappindicator_status_server_DEPENDENCIES = \
- $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libappindicator.la
test_libappindicator_status_server_LINK = $(LIBTOOL) $(AM_V_lt) \
--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(test_libappindicator_status_server_CFLAGS) $(CFLAGS) \
@@ -133,7 +130,7 @@ am_test_simple_app_OBJECTS = \
test_simple_app-test-simple-app.$(OBJEXT)
test_simple_app_OBJECTS = $(am_test_simple_app_OBJECTS)
test_simple_app_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/libappindicator.la
+ $(am__DEPENDENCIES_1) $(top_builddir)/src/libappindicator.la
test_simple_app_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(test_simple_app_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -164,7 +161,7 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(test_approver_SOURCES) $(test_libappindicator_SOURCES) \
+SOURCES = $(test_libappindicator_SOURCES) \
$(test_libappindicator_dbus_client_SOURCES) \
$(test_libappindicator_dbus_server_SOURCES) \
$(test_libappindicator_fallback_item_SOURCES) \
@@ -172,8 +169,7 @@ SOURCES = $(test_approver_SOURCES) $(test_libappindicator_SOURCES) \
$(test_libappindicator_status_client_SOURCES) \
$(test_libappindicator_status_server_SOURCES) \
$(test_simple_app_SOURCES)
-DIST_SOURCES = $(test_approver_SOURCES) \
- $(test_libappindicator_SOURCES) \
+DIST_SOURCES = $(test_libappindicator_SOURCES) \
$(test_libappindicator_dbus_client_SOURCES) \
$(test_libappindicator_dbus_server_SOURCES) \
$(test_libappindicator_fallback_item_SOURCES) \
@@ -204,7 +200,6 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSC = @CSC@
CYGPATH_W = @CYGPATH_W@
-DBUSSERVICEDIR = @DBUSSERVICEDIR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
@@ -231,10 +226,6 @@ GTKDOC_REBASE = @GTKDOC_REBASE@
GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
HTML_DIR = @HTML_DIR@
-INDICATORDIR = @INDICATORDIR@
-INDICATORICONSDIR = @INDICATORICONSDIR@
-INDICATOR_CFLAGS = @INDICATOR_CFLAGS@
-INDICATOR_LIBS = @INDICATOR_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -251,6 +242,8 @@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
+LIBRARY_CFLAGS = @LIBRARY_CFLAGS@
+LIBRARY_LIBS = @LIBRARY_LIBS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_PREFIX = @LIB_PREFIX@
@@ -296,6 +289,8 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@
+TESTDEPS_LIBS = @TESTDEPS_LIBS@
VALA_API_GEN = @VALA_API_GEN@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
@@ -354,12 +349,14 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-TESTS = test-approver-tester test-libappindicator-fallback \
- libappindicator-tests test-libappindicator-dbus \
- test-libappindicator-status
+TESTS = test-libappindicator-fallback libappindicator-tests \
+ test-libappindicator-dbus test-libappindicator-status
DISTCLEANFILES = $(TESTS) $(XML_REPORT) $(HTML_REPORT) \
libappindicator-tests-gtester
-EXTRA_DIST = run-xvfb.sh
+EXTRA_DIST = \
+ run-xvfb.sh \
+ test-libappindicator.desktop
+
#########################################
#########################################
@@ -367,12 +364,13 @@ test_libappindicator_SOURCES = \
test-libappindicator.c
test_libappindicator_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
+ -DSRCDIR="\"$(srcdir)\"" \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -383,12 +381,12 @@ test_libappindicator_dbus_client_SOURCES = \
test-libappindicator-dbus-client.c
test_libappindicator_dbus_client_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_dbus_client_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -399,12 +397,12 @@ test_libappindicator_dbus_server_SOURCES = \
test-libappindicator-dbus-server.c
test_libappindicator_dbus_server_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_dbus_server_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -415,12 +413,12 @@ test_libappindicator_status_client_SOURCES = \
test-libappindicator-status-client.c
test_libappindicator_status_client_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_status_client_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -431,28 +429,12 @@ test_libappindicator_status_server_SOURCES = \
test-libappindicator-status-server.c
test_libappindicator_status_server_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_status_server_LDADD = \
- $(INDICATOR_LIBS) \
- $(top_builddir)/src/libappindicator.la
-
-
-#########################################
-#########################################
-test_approver_SOURCES = \
- test-approver.c
-
-test_approver_CFLAGS = \
- $(INDICATOR_CFLAGS) \
- -Wall -Werror \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src
-
-test_approver_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -462,24 +444,24 @@ test_libappindicator_fallback_watcher_SOURCES = \
test-libappindicator-fallback-watcher.c
test_libappindicator_fallback_watcher_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_fallback_watcher_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
test_libappindicator_fallback_item_SOURCES = \
test-libappindicator-fallback-item.c
test_libappindicator_fallback_item_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_libappindicator_fallback_item_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
@@ -488,6 +470,7 @@ test_libappindicator_fallback_item_LDADD = \
XML_REPORT = libappindicator-check-results.xml
HTML_REPORT = libappindicator-check-results.html
DBUS_RUNNER = dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
+XFAIL_TESTS = test-libappindicator-dbus
#########################################
#########################################
@@ -495,12 +478,12 @@ test_simple_app_SOURCES = \
test-simple-app.c
test_simple_app_CFLAGS = \
- $(INDICATOR_CFLAGS) \
+ $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \
-Wall -Werror \
-I$(top_srcdir)/src
test_simple_app_LDADD = \
- $(INDICATOR_LIBS) \
+ $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \
$(top_builddir)/src/libappindicator.la
all: all-am
@@ -546,9 +529,6 @@ clean-checkPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-test-approver$(EXEEXT): $(test_approver_OBJECTS) $(test_approver_DEPENDENCIES)
- @rm -f test-approver$(EXEEXT)
- $(AM_V_CCLD)$(test_approver_LINK) $(test_approver_OBJECTS) $(test_approver_LDADD) $(LIBS)
test-libappindicator$(EXEEXT): $(test_libappindicator_OBJECTS) $(test_libappindicator_DEPENDENCIES)
@rm -f test-libappindicator$(EXEEXT)
$(AM_V_CCLD)$(test_libappindicator_LINK) $(test_libappindicator_OBJECTS) $(test_libappindicator_LDADD) $(LIBS)
@@ -580,7 +560,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_approver-test-approver.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_libappindicator-test-libappindicator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_libappindicator_dbus_client-test-libappindicator-dbus-client.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_libappindicator_dbus_server-test-libappindicator-dbus-server.Po@am__quote@
@@ -614,22 +593,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-test_approver-test-approver.o: test-approver.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_approver_CFLAGS) $(CFLAGS) -MT test_approver-test-approver.o -MD -MP -MF $(DEPDIR)/test_approver-test-approver.Tpo -c -o test_approver-test-approver.o `test -f 'test-approver.c' || echo '$(srcdir)/'`test-approver.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_approver-test-approver.Tpo $(DEPDIR)/test_approver-test-approver.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-approver.c' object='test_approver-test-approver.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_approver_CFLAGS) $(CFLAGS) -c -o test_approver-test-approver.o `test -f 'test-approver.c' || echo '$(srcdir)/'`test-approver.c
-
-test_approver-test-approver.obj: test-approver.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_approver_CFLAGS) $(CFLAGS) -MT test_approver-test-approver.obj -MD -MP -MF $(DEPDIR)/test_approver-test-approver.Tpo -c -o test_approver-test-approver.obj `if test -f 'test-approver.c'; then $(CYGPATH_W) 'test-approver.c'; else $(CYGPATH_W) '$(srcdir)/test-approver.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_approver-test-approver.Tpo $(DEPDIR)/test_approver-test-approver.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-approver.c' object='test_approver-test-approver.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_approver_CFLAGS) $(CFLAGS) -c -o test_approver-test-approver.obj `if test -f 'test-approver.c'; then $(CYGPATH_W) 'test-approver.c'; else $(CYGPATH_W) '$(srcdir)/test-approver.c'; fi`
-
test_libappindicator-test-libappindicator.o: test-libappindicator.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_libappindicator_CFLAGS) $(CFLAGS) -MT test_libappindicator-test-libappindicator.o -MD -MP -MF $(DEPDIR)/test_libappindicator-test-libappindicator.Tpo -c -o test_libappindicator-test-libappindicator.o `test -f 'test-libappindicator.c' || echo '$(srcdir)/'`test-libappindicator.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_libappindicator-test-libappindicator.Tpo $(DEPDIR)/test_libappindicator-test-libappindicator.Po
@@ -1058,13 +1021,6 @@ uninstall-am:
tags uninstall uninstall-am
-test-approver-tester: test-approver Makefile.am
- @echo "#!/bin/bash" > $@
- @echo export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=1000 >> $@
- @echo . $(srcdir)/run-xvfb.sh >> $@
- @echo $(DBUS_RUNNER) --task $(builddir)/test-approver --task-name Approver --task $(top_builddir)/src/indicator-application-service --task-name Service --ignore-return >> $@
- @chmod +x $@
-
test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am
@echo "#!/bin/bash" > $@
@echo . $(srcdir)/run-xvfb.sh >> $@
diff --git a/tests/test-approver.c b/tests/test-approver.c
deleted file mode 100644
index 2665505..0000000
--- a/tests/test-approver.c
+++ /dev/null
@@ -1,179 +0,0 @@
-#include <glib.h>
-#include <glib-object.h>
-
-#include <dbus/dbus-glib-bindings.h>
-
-#include "notification-watcher-client.h"
-#include "dbus-shared.h"
-#include "app-indicator.h"
-
-#define APPROVER_PATH "/my/approver"
-
-#define INDICATOR_ID "test-indicator-id"
-#define INDICATOR_ICON "test-indicator-icon-name"
-#define INDICATOR_CATEGORY APP_INDICATOR_CATEGORY_APPLICATION_STATUS
-
-#define TEST_APPROVER_TYPE (test_approver_get_type ())
-#define TEST_APPROVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_APPROVER_TYPE, TestApprover))
-#define TEST_APPROVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEST_APPROVER_TYPE, TestApproverClass))
-#define IS_TEST_APPROVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_APPROVER_TYPE))
-#define IS_TEST_APPROVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEST_APPROVER_TYPE))
-#define TEST_APPROVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_APPROVER_TYPE, TestApproverClass))
-
-typedef struct _TestApprover TestApprover;
-typedef struct _TestApproverClass TestApproverClass;
-
-struct _TestApproverClass {
- GObjectClass parent_class;
-};
-
-struct _TestApprover {
- GObject parent;
-};
-
-GType test_approver_get_type (void);
-
-static void test_approver_class_init (TestApproverClass *klass);
-static void test_approver_init (TestApprover *self);
-static gboolean _notification_approver_server_approve_item (TestApprover * ta, const gchar * id, const gchar * category, guint pid, const gchar * address, const gchar * path, gboolean * approved, GError ** error);
-
-#include "../src/notification-approver-server.h"
-
-GMainLoop * main_loop = NULL;
-DBusGConnection * session_bus = NULL;
-DBusGProxy * bus_proxy = NULL;
-AppIndicator * app_indicator = NULL;
-gboolean passed = FALSE;
-
-G_DEFINE_TYPE (TestApprover, test_approver, G_TYPE_OBJECT);
-
-static void
-test_approver_class_init (TestApproverClass *klass)
-{
- dbus_g_object_type_install_info(TEST_APPROVER_TYPE,
- &dbus_glib__notification_approver_server_object_info);
-
- return;
-}
-
-static void
-test_approver_init (TestApprover *self)
-{
- dbus_g_connection_register_g_object(session_bus,
- APPROVER_PATH,
- G_OBJECT(self));
-
- return;
-}
-
-static gboolean
-_notification_approver_server_approve_item (TestApprover * ta, const gchar * id, const gchar * category, guint pid, const gchar * address, const gchar * path, gboolean * approved, GError ** error)
-{
- *approved = TRUE;
- g_debug("Asked to approve indicator");
-
- if (g_strcmp0(id, INDICATOR_ID) == 0) {
- passed = TRUE;
- }
-
- g_main_loop_quit(main_loop);
-
- return TRUE;
-}
-
-static void
-register_cb (DBusGProxy * proxy, GError * error, gpointer user_data)
-{
- if (error != NULL) {
- g_warning("Unable to register approver: %s", error->message);
- g_error_free(error);
- g_main_loop_quit(main_loop);
- return;
- }
-
- g_debug("Building App Indicator");
- app_indicator = app_indicator_new(INDICATOR_ID, INDICATOR_ICON, INDICATOR_CATEGORY);
-
- GtkWidget * menu = gtk_menu_new();
- GtkWidget * mi = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-
- app_indicator_set_menu(app_indicator, GTK_MENU(menu));
-
- return;
-}
-
-gint owner_count = 0;
-gboolean
-check_for_service (gpointer user_data)
-{
- g_debug("Checking for Watcher");
-
- if (owner_count > 100) {
- g_warning("Couldn't find watcher after 100 tries.");
- g_main_loop_quit(main_loop);
- return FALSE;
- }
-
- owner_count++;
-
- gboolean has_owner = FALSE;
- org_freedesktop_DBus_name_has_owner(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, &has_owner, NULL);
-
- if (has_owner) {
- const char * cats = NULL;
- DBusGProxy * proxy = dbus_g_proxy_new_for_name(session_bus,
- NOTIFICATION_WATCHER_DBUS_ADDR,
- NOTIFICATION_WATCHER_DBUS_OBJ,
- NOTIFICATION_WATCHER_DBUS_IFACE);
-
- g_debug("Registering Approver");
- org_kde_StatusNotifierWatcher_x_ayatana_register_notification_approver_async (proxy, APPROVER_PATH, &cats, register_cb, NULL);
-
- return FALSE;
- }
-
- return TRUE;
-}
-
-gboolean
-fail_timeout (gpointer user_data)
-{
- g_debug("Failure timeout initiated.");
- g_main_loop_quit(main_loop);
- return FALSE;
-}
-
-int
-main (int argc, char ** argv)
-{
- GError * error = NULL;
-
- gtk_init(&argc, &argv);
- g_debug("Initing");
-
- session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
- if (error != NULL) {
- g_warning("Unable to get session bus: %s", error->message);
- g_error_free(error);
- return -1;
- }
-
- TestApprover * approver = g_object_new(TEST_APPROVER_TYPE, NULL);
-
- bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
-
- g_timeout_add(100, check_for_service, NULL);
- g_timeout_add_seconds(2, fail_timeout, NULL);
-
- main_loop = g_main_loop_new(NULL, FALSE);
- g_main_loop_run(main_loop);
-
- g_object_unref(approver);
-
- if (!passed) {
- return -1;
- }
-
- return 0;
-}
diff --git a/tests/test-libappindicator-dbus-client.c b/tests/test-libappindicator-dbus-client.c
index 1500213..9a51792 100644
--- a/tests/test-libappindicator-dbus-client.c
+++ b/tests/test-libappindicator-dbus-client.c
@@ -206,8 +206,6 @@ main (gint argc, gchar * argv[])
{
g_type_init();
- g_usleep(500000);
-
GError * error = NULL;
DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (error != NULL) {
@@ -230,8 +228,10 @@ main (gint argc, gchar * argv[])
dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL);
+ g_usleep(500000);
+
DBusGProxy * props = dbus_g_proxy_new_for_name_owner(session_bus,
- ":1.0",
+ ":1.2",
"/org/ayatana/NotificationItem/my_id",
DBUS_INTERFACE_PROPERTIES,
&error);
@@ -244,35 +244,35 @@ main (gint argc, gchar * argv[])
"Get",
prop_id_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
+ G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE,
G_TYPE_STRING, "Id",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_category_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
+ G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE,
G_TYPE_STRING, "Category",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_status_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
+ G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE,
G_TYPE_STRING, "Status",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_icon_name_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
+ G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE,
G_TYPE_STRING, "IconName",
G_TYPE_INVALID);
dbus_g_proxy_begin_call (props,
"Get",
prop_attention_icon_name_cb,
NULL, NULL,
- G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem",
+ G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE,
G_TYPE_STRING, "AttentionIconName",
G_TYPE_INVALID);
diff --git a/tests/test-libappindicator-dbus-server.c b/tests/test-libappindicator-dbus-server.c
index 995d49b..744ac0e 100644
--- a/tests/test-libappindicator-dbus-server.c
+++ b/tests/test-libappindicator-dbus-server.c
@@ -21,8 +21,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <gtk/gtk.h>
#include <app-indicator.h>
#include "test-defines.h"
@@ -41,8 +39,6 @@ main (gint argc, gchar * argv[])
{
gtk_init(&argc, &argv);
- g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
-
AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY);
app_indicator_set_status (ci, TEST_STATE);
diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c
index 8d12ac5..cadf783 100644
--- a/tests/test-libappindicator.c
+++ b/tests/test-libappindicator.c
@@ -25,6 +25,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <app-indicator.h>
+#include <libdbusmenu-glib/menuitem.h>
+#include <libdbusmenu-glib/server.h>
+
void
test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)
{
@@ -225,6 +228,57 @@ test_libappindicator_set_label (void)
}
void
+test_libappindicator_set_menu (void)
+{
+ AppIndicator * ci = app_indicator_new ("my-id",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ g_assert(ci != NULL);
+
+ GtkMenu * menu = GTK_MENU(gtk_menu_new());
+
+ GtkMenuItem * item = GTK_MENU_ITEM(gtk_menu_item_new_with_label("Test Label"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), GTK_WIDGET(item));
+ gtk_widget_show(GTK_WIDGET(item));
+
+ app_indicator_set_menu(ci, menu);
+
+ g_assert(app_indicator_get_menu(ci) != NULL);
+
+ GValue serverval = {0};
+ g_value_init(&serverval, DBUSMENU_TYPE_SERVER);
+ g_object_get_property(G_OBJECT(ci), "dbus-menu-server", &serverval);
+
+ DbusmenuServer * server = DBUSMENU_SERVER(g_value_get_object(&serverval));
+ g_assert(server != NULL);
+
+ GValue rootval = {0};
+ g_value_init(&rootval, DBUSMENU_TYPE_MENUITEM);
+ g_object_get_property(G_OBJECT(server), DBUSMENU_SERVER_PROP_ROOT_NODE, &rootval);
+ DbusmenuMenuitem * root = DBUSMENU_MENUITEM(g_value_get_object(&rootval));
+ g_assert(root != NULL);
+
+ GList * children = dbusmenu_menuitem_get_children(root);
+ g_assert(children != NULL);
+ g_assert(g_list_length(children) == 1);
+
+ const gchar * label = dbusmenu_menuitem_property_get(DBUSMENU_MENUITEM(children->data), DBUSMENU_MENUITEM_PROP_LABEL);
+ g_assert(label != NULL);
+ g_assert(g_strcmp0(label, "Test Label") == 0);
+
+ /* Interesting, eh? We need this because we send out events on the bus
+ but they don't come back until the idle is run. So we need those
+ events to clear before removing the object */
+ while (g_main_context_pending(NULL)) {
+ g_main_context_iteration(NULL, TRUE);
+ }
+
+ g_object_unref(G_OBJECT(ci));
+ return;
+}
+
+void
label_signals_cb (AppIndicator * appindicator, gchar * label, gchar * guide, gpointer user_data)
{
gint * label_signals_count = (gint *)user_data;
@@ -294,6 +348,75 @@ test_libappindicator_label_signals (void)
}
void
+test_libappindicator_desktop_menu (void)
+{
+ AppIndicator * ci = app_indicator_new ("my-id-desktop-menu",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ g_assert(ci != NULL);
+ g_assert(app_indicator_get_label(ci) == NULL);
+ g_assert(app_indicator_get_label_guide(ci) == NULL);
+
+ app_indicator_build_menu_from_desktop(ci, SRCDIR "/test-libappindicator.desktop", "Test Program");
+
+ GValue serverval = {0};
+ g_value_init(&serverval, DBUSMENU_TYPE_SERVER);
+ g_object_get_property(G_OBJECT(ci), "dbus-menu-server", &serverval);
+
+ DbusmenuServer * server = DBUSMENU_SERVER(g_value_get_object(&serverval));
+ g_assert(server != NULL);
+
+ GValue rootval = {0};
+ g_value_init(&rootval, DBUSMENU_TYPE_MENUITEM);
+ g_object_get_property(G_OBJECT(server), DBUSMENU_SERVER_PROP_ROOT_NODE, &rootval);
+ DbusmenuMenuitem * root = DBUSMENU_MENUITEM(g_value_get_object(&rootval));
+ g_assert(root != NULL);
+
+ GList * children = dbusmenu_menuitem_get_children(root);
+ g_assert(children != NULL);
+ g_assert(g_list_length(children) == 3);
+
+
+
+ g_object_unref(G_OBJECT(ci));
+ return;
+}
+
+void
+test_libappindicator_desktop_menu_bad (void)
+{
+ AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad",
+ "my-name",
+ APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+
+ g_assert(ci != NULL);
+ g_assert(app_indicator_get_label(ci) == NULL);
+ g_assert(app_indicator_get_label_guide(ci) == NULL);
+
+ app_indicator_build_menu_from_desktop(ci, SRCDIR "/test-libappindicator.desktop", "Not Test Program");
+
+ GValue serverval = {0};
+ g_value_init(&serverval, DBUSMENU_TYPE_SERVER);
+ g_object_get_property(G_OBJECT(ci), "dbus-menu-server", &serverval);
+
+ DbusmenuServer * server = DBUSMENU_SERVER(g_value_get_object(&serverval));
+ g_assert(server != NULL);
+
+ GValue rootval = {0};
+ g_value_init(&rootval, DBUSMENU_TYPE_MENUITEM);
+ g_object_get_property(G_OBJECT(server), DBUSMENU_SERVER_PROP_ROOT_NODE, &rootval);
+ DbusmenuMenuitem * root = DBUSMENU_MENUITEM(g_value_get_object(&rootval));
+ g_assert(root != NULL);
+
+ GList * children = dbusmenu_menuitem_get_children(root);
+ g_assert(g_list_length(children) == 0);
+
+ g_object_unref(G_OBJECT(ci));
+ return;
+}
+
+void
test_libappindicator_props_suite (void)
{
g_test_add_func ("/indicator-application/libappindicator/init", test_libappindicator_init);
@@ -301,7 +424,10 @@ test_libappindicator_props_suite (void)
g_test_add_func ("/indicator-application/libappindicator/init_set_props", test_libappindicator_init_set_props);
g_test_add_func ("/indicator-application/libappindicator/prop_signals", test_libappindicator_prop_signals);
g_test_add_func ("/indicator-application/libappindicator/set_label", test_libappindicator_set_label);
+ g_test_add_func ("/indicator-application/libappindicator/set_menu", test_libappindicator_set_menu);
g_test_add_func ("/indicator-application/libappindicator/label_signals", test_libappindicator_label_signals);
+ g_test_add_func ("/indicator-application/libappindicator/desktop_menu", test_libappindicator_desktop_menu);
+ g_test_add_func ("/indicator-application/libappindicator/desktop_menu_bad",test_libappindicator_desktop_menu_bad);
return;
}
diff --git a/tests/test-libappindicator.desktop b/tests/test-libappindicator.desktop
new file mode 100644
index 0000000..59be810
--- /dev/null
+++ b/tests/test-libappindicator.desktop
@@ -0,0 +1,23 @@
+[Desktop Entry]
+Name=AppIndicator Test
+GenericName=Test
+Comment=This is only a test
+Exec=/usr/bin/false
+Terminal=false
+Type=Application
+X-Ayatana-Desktop-Shortcuts=Short1;Short2;Short3;
+
+[Short1 Shortcut Group]
+Name=Shortcut 1
+Exec=/usr/bin/true
+OnlyShowIn=Test Program;
+
+[Short2 Shortcut Group]
+Name=Shortcut 2
+Exec=/usr/bin/true
+OnlyShowIn=Test Program;
+
+[Short3 Shortcut Group]
+Name=Shortcut 3
+Exec=/usr/bin/true
+OnlyShowIn=Test Program;