Merge "custom eail widget implementation" into tizen
[platform/core/uifw/eail.git] / tests / eail_naviframe_tc1.c
1 /*
2  * Tested interface: AtkObject
3  *
4  * Tested AtkObject: EailNaviframe
5  *
6  * Description: Test AtkAction interface
7  *
8  * Test input: accessible object representing EailNaviframe
9  *
10  * Expected test result: test should return 0 (success)
11  */
12
13 #include <Elementary.h>
14 #include <atk/atk.h>
15
16 #include "eail_test_utils.h"
17
18 INIT_TEST("EailNaviframe")
19
20 static void
21 _do_test(AtkObject *obj)
22 {
23    int child_count = 0;
24
25    g_assert(ATK_IS_OBJECT(obj));
26    atk_object_set_description(obj, "test");
27    g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
28
29    g_object_ref(obj);
30    child_count = atk_object_get_n_accessible_children(obj);
31    g_assert(child_count == 0);
32
33    g_assert(atk_object_get_role(obj) == ATK_ROLE_PAGE_TAB_LIST);
34    g_object_unref(obj);
35
36    eailu_test_code_called = 1;
37 }
38
39 static void
40 _init_naviframe(Evas_Object *win)
41 {
42    Evas_Object *nf;
43
44    nf = elm_naviframe_add(win);
45    evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
46    elm_win_resize_object_add(win, nf);
47    evas_object_show(nf);
48    evas_object_resize(win, 800, 600);
49 }
50
51 EAPI_MAIN int
52 elm_main(int argc, char **argv)
53 {
54    Evas_Object *win;
55    win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
56    _init_naviframe(win);
57    evas_object_show(win);
58
59    elm_run();
60    elm_shutdown();
61
62    return 0;
63 }
64 ELM_MAIN()