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-02-14 12:04:24 -08:00
|
|
|
START_TEST (elm_label_legacy_type_check)
|
|
|
|
{
|
|
|
|
Evas_Object *win, *label;
|
|
|
|
const char *type;
|
|
|
|
|
2018-03-06 06:43:06 -08:00
|
|
|
char *args[] = { "exe" };
|
|
|
|
elm_init(1, args);
|
2018-02-14 12:04:24 -08:00
|
|
|
win = elm_win_add(NULL, "label", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
label = elm_label_add(win);
|
|
|
|
|
|
|
|
type = elm_object_widget_type_get(label);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "Elm_Label"));
|
|
|
|
|
|
|
|
type = evas_object_type_get(label);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "elm_label"));
|
|
|
|
|
|
|
|
elm_shutdown();
|
|
|
|
}
|
|
|
|
END_TEST
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
START_TEST (elm_atspi_role_get)
|
|
|
|
{
|
|
|
|
Evas_Object *win, *label;
|
2017-10-18 18:13:54 -07:00
|
|
|
Efl_Access_Role role;
|
2014-06-10 19:07:15 -07:00
|
|
|
|
2018-03-06 06:43:06 -08:00
|
|
|
char *args[] = { "exe" };
|
|
|
|
elm_init(1, args);
|
2014-06-10 19:07:15 -07:00
|
|
|
win = elm_win_add(NULL, "label", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
label = elm_label_add(win);
|
2017-10-18 18:13:54 -07:00
|
|
|
role = efl_access_role_get(label);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
2017-10-18 18:13:54 -07:00
|
|
|
ck_assert(role == EFL_ACCESS_ROLE_LABEL);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
elm_shutdown();
|
|
|
|
}
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
void elm_test_label(TCase *tc)
|
|
|
|
{
|
2018-02-14 12:04:24 -08:00
|
|
|
tcase_add_test(tc, elm_label_legacy_type_check);
|
|
|
|
tcase_add_test(tc, elm_atspi_role_get);
|
2014-06-10 19:07:15 -07:00
|
|
|
}
|