aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-16 03:45:00 +0100
committerTed Gould <ted@gould.cx>2012-01-16 03:45:00 +0100
commitf898563b6eaff8a00dd0cc2f7adabed16b80b698 (patch)
tree5b46e2be862ea1a17d663a0519fb6cedf49c5590 /tests
parent2dfe3fff249cd22eea6a993dc5ec50b129d961f1 (diff)
downloadlibayatana-indicator-f898563b6eaff8a00dd0cc2f7adabed16b80b698.tar.gz
libayatana-indicator-f898563b6eaff8a00dd0cc2f7adabed16b80b698.tar.bz2
libayatana-indicator-f898563b6eaff8a00dd0cc2f7adabed16b80b698.zip
Adding a test to look to make sure the fallback works
Diffstat (limited to 'tests')
-rw-r--r--tests/test-loader.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test-loader.c b/tests/test-loader.c
index 3adce3b..48537c0 100644
--- a/tests/test-loader.c
+++ b/tests/test-loader.c
@@ -26,6 +26,31 @@ License along with this library. If not, see
#include "dummy-indicator-entry-func.h"
void
+test_loader_entry_func_window (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;
+
+ dummy_indicator_entry_func_support_window(entryfunc, FALSE);
+ indicator_object_entry_activate_window(object, NULL, 0, 0);
+ g_assert(entryfunc->entry_activate_called);
+
+ dummy_indicator_entry_func_support_window(entryfunc, TRUE);
+ indicator_object_entry_activate_window(object, NULL, 0, 0);
+ g_assert(entryfunc->entry_activate_window_called);
+
+ g_object_unref(object);
+
+ return;
+}
+
+void
test_loader_entry_funcs (void)
{
IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-entry-func.so");
@@ -203,6 +228,7 @@ test_loader_creation_deletion_suite (void)
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);
+ g_test_add_func ("/libindicator/loader/dummy/entry_func_window", test_loader_entry_func_window);
return;
}