Like JackDanielZ suggested.
selected = EINA_FALSE;
ck_assert(elm_fileselector_selected_set(fileselector, path));
- ck_assert(elm_test_helper_wait_flag(&selected));
+ ck_assert(elm_test_helper_wait_flag(10, &selected));
ck_assert_str_eq(elm_fileselector_selected_get(fileselector), path);
selected = EINA_FALSE;
ck_assert(elm_fileselector_selected_set(fileselector, exist));
- ck_assert(elm_test_helper_wait_flag(&selected));
+ ck_assert(elm_test_helper_wait_flag(10, &selected));
ck_assert_str_eq(elm_fileselector_selected_get(fileselector), exist);
#include <Ecore.h>
#include "elm_suite.h"
-const double timeout = 10;
-
typedef struct _Callback_Data
{
Ecore_Timer *timer;
}
Eina_Bool
-elm_test_helper_wait_flag(Eina_Bool *done)
+elm_test_helper_wait_flag(double in, Eina_Bool *done)
{
Callback_Data data;
data.did_timeout = EINA_FALSE;
- data.timer = ecore_timer_add(timeout, timer_expired_cb, &data);
+ data.timer = ecore_timer_add(in, timer_expired_cb, &data);
while (*done == EINA_FALSE && data.did_timeout == EINA_FALSE)
ecore_main_loop_iterate();
#include <Eina.h>
-Eina_Bool elm_test_helper_wait_flag(Eina_Bool *done);
+Eina_Bool elm_test_helper_wait_flag(double in, Eina_Bool *done);
#endif /* _ELM_TEST_HELPER_H */