2014-06-10 19:07:15 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2017-11-07 21:18:05 -08:00
|
|
|
#define EFL_ACCESS_BETA
|
2014-06-10 19:07:15 -07:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include "elm_suite.h"
|
|
|
|
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_START_TEST (elm_icon_legacy_type_check)
|
2018-02-14 12:04:24 -08:00
|
|
|
{
|
|
|
|
Evas_Object *win, *icon;
|
|
|
|
const char *type;
|
|
|
|
|
|
|
|
win = elm_win_add(NULL, "icon", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
icon = elm_icon_add(win);
|
|
|
|
|
|
|
|
type = elm_object_widget_type_get(icon);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "Elm_Icon"));
|
|
|
|
|
|
|
|
type = evas_object_type_get(icon);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "elm_icon"));
|
|
|
|
|
|
|
|
}
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_END_TEST
|
2014-06-10 19:07:15 -07:00
|
|
|
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_START_TEST (elm_atspi_role_get)
|
2014-06-10 19:07:15 -07:00
|
|
|
{
|
|
|
|
Evas_Object *win, *icon;
|
2017-10-18 18:13:54 -07:00
|
|
|
Efl_Access_Role role;
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
win = elm_win_add(NULL, "icon", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
icon = elm_icon_add(win);
|
2017-10-18 18:13:54 -07:00
|
|
|
role = efl_access_role_get(icon);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
2017-11-12 19:08:43 -08:00
|
|
|
ck_assert(role == EFL_ACCESS_ROLE_ICON);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
}
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_END_TEST
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
void elm_test_icon(TCase *tc)
|
|
|
|
{
|
2018-02-14 12:04:24 -08:00
|
|
|
tcase_add_test(tc, elm_icon_legacy_type_check);
|
|
|
|
tcase_add_test(tc, elm_atspi_role_get);
|
2014-06-10 19:07:15 -07:00
|
|
|
}
|