2 * Tested interface: AtkImage
4 * Tested AtkObject: EailBackground
6 * Description: Test AtkImage interface
8 * Test input: accessible object representing EailBackground
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
17 #include "eail_test_utils.h"
21 #define TEST_STR "bg-test"
22 #define IMG_PATH "./data/08.jpg"
28 INIT_TEST("EailBackground")
31 _do_test(AtkObject *obj)
36 g_assert(ATK_IS_IMAGE(obj));
38 g_assert(atk_image_set_image_description(ATK_IMAGE(obj), TEST_STR));
39 desc = atk_image_get_image_description(ATK_IMAGE(obj));
40 g_assert(!g_strcmp0(desc, TEST_STR));
42 atk_image_get_image_size(ATK_IMAGE(obj), &w, &h);
44 g_assert(h == HEIGHT);
46 atk_image_get_image_position(ATK_IMAGE(obj), &w, &h, ATK_XY_WINDOW);
50 eailu_test_code_called = 1;
54 _init_background(Evas_Object *win)
60 elm_bg_load_size_set(bg, 20, 20);
61 elm_bg_option_set(bg, ELM_BG_OPTION_STRETCH);
62 g_snprintf(buf, sizeof(buf), IMG_PATH);
63 elm_bg_file_set(bg, buf, NULL);
64 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
65 elm_win_resize_object_add(win, bg);
67 evas_object_resize(win, WIDTH, HEIGHT);
71 elm_main(int argc, char **argv)
75 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
76 _init_background(win);
77 evas_object_show(win);