2 * Tested interface: AtkObject
4 * Tested AtkObject: EailPlug
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailPlug
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
18 #include "eail_test_utils.h"
23 _init_plug(Evas_Object *win)
25 Evas_Object *bg, *plug;
26 const char *filename = "data/plant_01.jpg";
29 elm_bg_file_set(bg, filename, NULL);
30 elm_win_resize_object_add(win, bg);
31 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
34 plug = elm_plug_add(win);
35 evas_object_resize(plug, 380, 500);
36 evas_object_move(plug, 10, 10);
37 evas_object_show(plug);
41 _do_test(AtkObject *obj)
43 const char *type_name = g_type_name(G_TYPE_FROM_INSTANCE(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");
48 g_assert_cmpstr(type_name, ==, "EailPlug");
50 atk_object_set_name(obj, "test name");
51 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
53 g_assert(atk_object_get_role(obj) == ATK_ROLE_IMAGE);
55 eailu_test_code_called = 1;
59 elm_main(int argc, char **argv)
63 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
66 evas_object_show(win);