2 * Tested interface: AtkObject
4 * Tested AtkObject: EailIcon
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailIcon
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
15 #include "eail_test_utils.h"
17 #define ICON_NAME "home"
23 _init_icon(Evas_Object *win)
25 Evas_Object *bg, *icon;
28 elm_win_resize_object_add(win, bg);
29 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
32 icon = elm_icon_add(win);
33 elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
34 elm_icon_standard_set(icon, ICON_NAME);
35 evas_object_resize(icon, ICON_SIZE, ICON_SIZE);
36 evas_object_show(icon);
40 _do_test(AtkObject *obj)
42 const char *type_name = g_type_name(G_TYPE_FROM_INSTANCE(obj));
43 const char *name = atk_object_get_name(obj);
45 g_assert(ATK_IS_OBJECT(obj));
46 atk_object_set_description(obj, "test");
47 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
49 atk_object_set_name(obj, "test name");
50 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
52 g_assert_cmpstr(type_name, ==, "EailIcon");
54 g_assert_cmpstr(name, ==, ICON_NAME);
56 g_assert(atk_object_get_role(obj) == ATK_ROLE_ICON);
58 eailu_test_code_called = 1;
62 elm_main(int argc, char **argv)
66 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
69 evas_object_show(win);