2 * Tested interface: AtkObject
4 * Tested AtkObject: EailInwin
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailInwin
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
15 #include "eail_test_utils.h"
17 #define CHILDREN_COUNT 1
19 INIT_TEST("EailInwin")
22 _do_test(AtkObject *obj)
25 const char *child_name;
27 g_assert(ATK_IS_OBJECT(obj));
29 g_assert(atk_object_get_role(obj) == ATK_ROLE_GLASS_PANE);
30 atk_object_set_description(obj, "test");
31 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
33 atk_object_set_name(obj, "test name");
34 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
36 g_assert(atk_object_get_n_accessible_children(obj) == CHILDREN_COUNT);
38 child = atk_object_ref_accessible_child(obj, 0);
40 child_name = g_type_name(G_TYPE_FROM_INSTANCE(child));
41 g_assert_cmpstr(child_name, ==, "EailButton");
42 g_object_unref(child);
44 eailu_test_code_called = 1;
48 _init_inwin(Evas_Object *win)
50 Evas_Object *o, *bg, *parent, *inwin;
52 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
53 elm_win_autodel_set(win, EINA_TRUE);
56 elm_win_resize_object_add(win, bg);
57 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
61 inwin = elm_win_inwin_add(parent);
62 elm_object_style_set(inwin, "default");
63 evas_object_show(inwin);
64 elm_win_inwin_activate(inwin);
66 o = elm_button_add(parent);
67 elm_object_text_set(o, "Test");
70 elm_win_inwin_content_set(inwin, o);
74 elm_main(int argc, char *argv[])
78 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
80 evas_object_show(win);