summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_test_menu.c
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2018-02-14 12:04:24 -0800
committerCedric Bail <cedric@osg.samsung.com>2018-02-14 12:47:40 -0800
commit855c1886b68d898722e5aab5e27a10eba4294655 (patch)
tree2883d92bff48a6aee2e761f057175a8ae0d9214d /src/tests/elementary/elm_test_menu.c
parent274730fc5f7e9e8995554ca02dfe8abd8b45211e (diff)
downloadefl-855c1886b68d898722e5aab5e27a10eba4294655.tar.gz
elementary: fix legacy widget type name for backward compat
Summary: For example, the widget type of elm_button was "Elm_Button". But, the object which is created by elm_button_add() will return its widget type "Efl.Ui.Button_Legacy". It is not legacy name. It should be fixed to return "Elm_Button". I don't know when but eolian start to make class name with ".". So, it should be converted to "_" for all widgets. @fix Test Plan: All test cases are included in this patch. Run "make check" Reviewers: raster, cedric, jpeg, taxi2se Reviewed By: cedric Subscribers: taxi2se, woohyun Differential Revision: https://phab.enlightenment.org/D5782 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to 'src/tests/elementary/elm_test_menu.c')
-rw-r--r--src/tests/elementary/elm_test_menu.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/tests/elementary/elm_test_menu.c b/src/tests/elementary/elm_test_menu.c
index 69f2512ed7..d1e7c24419 100644
--- a/src/tests/elementary/elm_test_menu.c
+++ b/src/tests/elementary/elm_test_menu.c
@@ -6,6 +6,27 @@
#include <Elementary.h>
#include "elm_suite.h"
+START_TEST (elm_menu_legacy_type_check)
+{
+ Evas_Object *win, *menu;
+ const char *type;
+
+ elm_init(1, NULL);
+ 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
START_TEST (elm_atspi_role_get)
{
@@ -26,5 +47,6 @@ END_TEST
void elm_test_menu(TCase *tc)
{
- tcase_add_test(tc, elm_atspi_role_get);
+ tcase_add_test(tc, elm_menu_legacy_type_check);
+ tcase_add_test(tc, elm_atspi_role_get);
}