10 * Expected test result:
13 #include <Elementary.h>
16 #include "eail_custom_widget.h"
17 #include "eail_factory.h"
18 #include "eail_widget.h"
19 #include "eail_test_utils.h"
21 INIT_TEST("EailCustomWidget")
24 _init_custom_widget(Evas_Object *win)
26 Evas_Object *bg, *rectangle;
31 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
32 elm_win_resize_object_add(win, bg);
35 Evas_Object *label = elm_label_add(win);
37 elm_object_text_set(label, "This is the CONTENT");
38 evas_object_show(label);
40 rectangle = evas_object_rectangle_add(evas_object_evas_get(win));
41 evas_object_resize(rectangle, 10, 10);
42 evas_object_show(rectangle);
44 ao = eail_custom_widget_create(rectangle);
48 wgt = eail_factory_get_accessible(label);
49 eail_widget_add_custom_widget_child(wgt, ao);
51 g_assert(1 == atk_object_get_n_accessible_children(wgt));
52 g_assert(wgt == atk_object_get_parent(ao));
54 g_assert(0 == atk_object_get_index_in_parent(ao));
56 evas_object_del(rectangle);
58 g_assert(0 == atk_object_get_n_accessible_children(wgt));
63 _do_test(AtkObject *obj)
65 eailu_test_code_called = 1;
69 elm_main(int argc, char **argv)
73 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
75 _init_custom_widget(win);
76 evas_object_show(win);