forked from enlightenment/efl
tests/layout: add explicit test for implicit theme,changed emission
this must be emitted automatically during finalize if theme_set is not directly called during construction Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10741
This commit is contained in:
parent
d54ba94214
commit
d434bee31b
|
@ -149,6 +149,28 @@ EFL_START_TEST(efl_ui_layout_test_layout_force)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
/* private */
|
||||
EAPI Eina_Bool elm_widget_theme_klass_set(Evas_Object *obj, const char *name);
|
||||
EAPI Eina_Bool elm_widget_theme_style_set(Evas_Object *obj, const char *name);
|
||||
|
||||
EFL_START_TEST(efl_ui_layout_test_callback)
|
||||
{
|
||||
Evas_Object *win;
|
||||
int called = 0;
|
||||
Eina_Bool klass, style;
|
||||
|
||||
win = win_add(NULL, "layout", EFL_UI_WIN_TYPE_BASIC);
|
||||
efl_add(EFL_UI_LAYOUT_CLASS, win,
|
||||
efl_event_callback_add(efl_added, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, (void*)event_callback_single_call_int_data, &called),
|
||||
klass = elm_widget_theme_klass_set(efl_added, "button"),
|
||||
style = elm_widget_theme_style_set(efl_added, "anchor")
|
||||
);
|
||||
ck_assert_int_eq(klass, 1);
|
||||
ck_assert_int_eq(style, 1);
|
||||
ck_assert_int_eq(called, 1);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(efl_ui_layout_test_layout_theme)
|
||||
{
|
||||
Evas_Object *win;
|
||||
|
@ -194,5 +216,6 @@ void efl_ui_test_layout(TCase *tc)
|
|||
tcase_add_test(tc, efl_ui_layout_test_layout_force);
|
||||
tcase_add_test(tc, efl_ui_layout_test_layout_theme);
|
||||
tcase_add_test(tc, efl_ui_layout_test_api_ordering);
|
||||
tcase_add_test(tc, efl_ui_layout_test_callback);
|
||||
tcase_add_test(tc, efl_ui_layout_test_property_bind_provider);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue