2 * Tested interface: AtkImage
4 * Tested AtkObject: EailIcon
6 * Description: Test AtkImage interface
8 * Test input: accessible object representing EailIcon
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
18 #define ACTIONS_NUMBER 1
20 #define ICON_NAME "home"
26 _init_icon(Evas_Object *win)
28 Evas_Object *bg, *icon;
31 elm_win_resize_object_add(win, bg);
32 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
35 icon = elm_icon_add(win);
36 elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
37 elm_icon_standard_set(icon, ICON_NAME);
38 evas_object_resize(icon, ICON_SIZE, ICON_SIZE);
39 evas_object_show(icon);
43 _do_test(AtkObject *obj)
46 const char *desc_test = "top secret";
47 int height = 0, width = 0;
50 atk_image_get_image_position(ATK_IMAGE(obj), &x, &y, ATK_XY_SCREEN);
51 _printf("atk_image_get_image_position on screen: x: %d y %d\n", x, y);
53 g_assert(NULL == atk_image_get_image_description(ATK_IMAGE(obj)));
54 g_assert(TRUE == atk_image_set_image_description(ATK_IMAGE(obj), desc_test));
55 desc = atk_image_get_image_description(ATK_IMAGE(obj));
56 g_assert_cmpstr(desc_test, ==, desc);
58 atk_image_get_image_size(ATK_IMAGE(obj), &height, &width);
59 g_assert(ICON_SIZE == height && ICON_SIZE == width);
61 eailu_test_code_called = 1;
65 elm_main(int argc, char **argv)
69 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
72 evas_object_show(win);