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_menu_legacy_type_check)
|
|
|
|
{
|
|
|
|
Evas_Object *win, *menu;
|
|
|
|
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, "menu", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
menu = elm_menu_add(win);
|
|
|
|
|
|
|
|
type = elm_object_widget_type_get(menu);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "Elm_Menu"));
|
|
|
|
|
|
|
|
type = evas_object_type_get(menu);
|
|
|
|
ck_assert(type != NULL);
|
|
|
|
ck_assert(!strcmp(type, "elm_menu"));
|
|
|
|
|
|
|
|
elm_shutdown();
|
|
|
|
}
|
|
|
|
END_TEST
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
START_TEST (elm_atspi_role_get)
|
|
|
|
{
|
|
|
|
Evas_Object *win, *menu;
|
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, "menu", ELM_WIN_BASIC);
|
|
|
|
|
|
|
|
menu = elm_menu_add(win);
|
2017-10-18 18:13:54 -07:00
|
|
|
role = efl_access_role_get(menu);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
2017-10-18 18:13:54 -07:00
|
|
|
ck_assert(role == EFL_ACCESS_ROLE_MENU);
|
2014-06-10 19:07:15 -07:00
|
|
|
|
|
|
|
elm_shutdown();
|
|
|
|
}
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
void elm_test_menu(TCase *tc)
|
|
|
|
{
|
2018-02-14 12:04:24 -08:00
|
|
|
tcase_add_test(tc, elm_menu_legacy_type_check);
|
|
|
|
tcase_add_test(tc, elm_atspi_role_get);
|
2014-06-10 19:07:15 -07:00
|
|
|
}
|