summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-03-27 21:15:53 +0100
committerCedric BAIL <cedric.bail@free.fr>2019-03-27 15:03:41 -0700
commit197210cde2bc1b94490c2a37ca001701b22550d3 (patch)
tree8b7777422b83d5b60b625682da17a84ff2af53fc /src/tests
parent8ab3f3319eb508e812a901e4b3b73e7345e68b07 (diff)
elc_filselector: solve the mysterium of sometimes failing tests
so after a phone call, two days of debugging, tears, crying etc. etc. we finally came to a point of enlightenment! *Someone* (bu5hm4n) moved gengrid and genlist events from eo back to smart events, so we can work arround legacy borks and event-name collisions, at this point he did not knew that some widgets (fileselector) already relied on those *lovely* events. Hence this broke theoretically the testsuite, however, the fileselector testsuite is ultimatily buggy, and the wait function does not return false when it timeouts, (i don't know why not). So this break was never discovered. Additionally there is a second issue. it appears, that when we immidiatly quit the mainloop after we have got the selected callback, that then genlist decides to forget about the sd->selected pointer, and NULLs that one out. Which then results in the fact that elm_fileselector_selected_get ends up returning invalid paths. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8488
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_test_fileselector.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tests/elementary/elm_test_fileselector.c b/src/tests/elementary/elm_test_fileselector.c
index c7ffaca627..be8b53d672 100644
--- a/src/tests/elementary/elm_test_fileselector.c
+++ b/src/tests/elementary/elm_test_fileselector.c
@@ -86,8 +86,6 @@ _ready_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED
86{ 86{
87 Eina_Bool *ret = data; 87 Eina_Bool *ret = data;
88 *ret = EINA_TRUE; 88 *ret = EINA_TRUE;
89
90 ecore_main_loop_quit();
91} 89}
92 90
93EFL_START_TEST(elm_fileselector_selected) 91EFL_START_TEST(elm_fileselector_selected)
@@ -131,7 +129,7 @@ EFL_START_TEST(elm_fileselector_selected)
131 selected = EINA_FALSE; 129 selected = EINA_FALSE;
132 ck_assert(elm_fileselector_selected_set(fileselector, exist)); 130 ck_assert(elm_fileselector_selected_set(fileselector, exist));
133 ck_assert(fileselector_test_helper_wait_flag(10, &selected)); 131 ck_assert(fileselector_test_helper_wait_flag(10, &selected));
134 132 ck_assert(selected == EINA_TRUE);
135 ck_assert_str_eq(elm_fileselector_selected_get(fileselector), exist); 133 ck_assert_str_eq(elm_fileselector_selected_get(fileselector), exist);
136 134
137 eina_stringshare_del(exist); 135 eina_stringshare_del(exist);