forked from enlightenment/efl
tests/elm: add utils for detecting buffer engine and setting fork init cb
Summary: this allows use of the global win object prior to actually being inside a test for the purpose of doing additional setup Depends on D10572 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10573
This commit is contained in:
parent
ec7562fddf
commit
7cd9113f1f
|
@ -277,6 +277,20 @@ is_forked(void)
|
|||
return getpid() != main_pid;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
is_buffer(void)
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void (*suite_setup_cb)(Eo*);
|
||||
|
||||
void
|
||||
suite_setup_cb_set(void (*cb)(Eo*))
|
||||
{
|
||||
suite_setup_cb = cb;
|
||||
}
|
||||
|
||||
int
|
||||
suite_setup(Eina_Bool legacy)
|
||||
{
|
||||
|
@ -311,6 +325,7 @@ suite_setup(Eina_Bool legacy)
|
|||
{
|
||||
global_win = _elm_suite_win_create();
|
||||
force_focus_win(global_win);
|
||||
if (suite_setup_cb) suite_setup_cb(global_win);
|
||||
}
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(failed_count, 255);
|
||||
/* preload default theme */
|
||||
|
|
|
@ -12,6 +12,8 @@ void *real_timer_add(double in, Ecore_Task_Cb cb, void *data);
|
|||
void fail_on_errors_teardown(void);
|
||||
void fail_on_errors_setup(void);
|
||||
Eina_Bool is_forked(void);
|
||||
Eina_Bool is_buffer(void);
|
||||
void suite_setup_cb_set(void (*cb)(Eo*));
|
||||
|
||||
void get_me_to_those_events(Eo *obj);
|
||||
void click_object(Eo *obj);
|
||||
|
|
Loading…
Reference in New Issue