diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/test-loader.c | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 9d16748..13a34c4 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -433,7 +433,7 @@ DISTCLEANFILES += service-manager-connect-nostart-tester XML_REPORT = loader-check-results.xml HTML_REPORT = loader-check-results.html -loader-tester: test-loader libdummy-indicator-null.la libdummy-indicator-simple.la Makefile +loader-tester: test-loader libdummy-indicator-null.la libdummy-indicator-simple.la libdummy-indicator-entry-func.la Makefile @echo "#!/bin/bash" > loader-tester @echo $(XVFB_RUN) >> $@ @echo gtester -k --verbose -o=$(XML_REPORT) ./test-loader >> loader-tester diff --git a/tests/test-loader.c b/tests/test-loader.c index ac9d4e5..3adce3b 100644 --- a/tests/test-loader.c +++ b/tests/test-loader.c @@ -23,6 +23,34 @@ License along with this library. If not, see #include <gtk/gtk.h> #include "libindicator/indicator-object.h" +#include "dummy-indicator-entry-func.h" + +void +test_loader_entry_funcs (void) +{ + IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-entry-func.so"); + g_assert(object != NULL); + + DummyIndicatorEntryFunc * entryfunc = (DummyIndicatorEntryFunc *)(object); + + entryfunc->entry_activate_called = FALSE; + entryfunc->entry_activate_window_called = FALSE; + entryfunc->entry_close_called = FALSE; + + indicator_object_entry_activate(object, NULL, 0); + g_assert(entryfunc->entry_activate_called); + + indicator_object_entry_activate_window(object, NULL, 0, 0); + g_assert(entryfunc->entry_activate_window_called); + + indicator_object_entry_close(object, NULL, 0); + g_assert(entryfunc->entry_close_called); + + g_object_unref(object); + + return; +} + void destroy_cb (gpointer data, GObject * object); void @@ -174,6 +202,7 @@ test_loader_creation_deletion_suite (void) g_test_add_func ("/libindicator/loader/dummy/simple_accessors", test_loader_filename_dummy_simple_accessors); g_test_add_func ("/libindicator/loader/dummy/simple_location", test_loader_filename_dummy_simple_location); g_test_add_func ("/libindicator/loader/dummy/signaler", test_loader_filename_dummy_signaler); + g_test_add_func ("/libindicator/loader/dummy/entry_funcs", test_loader_entry_funcs); return; } |