Merge "custom eail widget implementation" into tizen
[platform/core/uifw/eail.git] / tests / eail_tooltip_tc1.c
1 /*
2  * Tested interface: AtkObject
3  *
4  * Tested AtkObject: EailTooltip
5  *
6  * Description: Test whether accessible object is successfully registered
7  *    in GObject type system and is visible in AtkObject tree.
8  *
9  * Test input: accessible object representing EailTooltip
10  *
11  * Expected test result: test should return 0 (success)
12  */
13
14 #include <Elementary.h>
15 #include <atk/atk.h>
16 #include "eail_test_utils.h"
17
18 INIT_TEST("EailWindow")
19
20 static void
21 _do_test(AtkObject *obj)
22 {
23    g_assert(ATK_IS_OBJECT(obj));
24
25    g_assert(atk_object_get_role(obj) == ATK_ROLE_WINDOW);
26
27    atk_object_set_description(obj, "test");
28    g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
29
30    atk_object_set_name(obj, "test name");
31    g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
32
33    eailu_test_code_called = 1;
34 }
35
36 static void
37 _init_tooltip(Evas_Object *win)
38 {
39    const char *text = "test text";
40    elm_object_tooltip_text_set(win, text);
41    elm_object_tooltip_show(win);
42
43    evas_object_resize(win, 320, 320);
44 }
45
46 EAPI_MAIN int
47 elm_main(int argc, char **argv)
48 {
49    Evas_Object *win;
50
51    win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
52    _init_tooltip(win);
53
54    evas_object_show(win);
55    elm_run();
56    elm_shutdown();
57
58    return 0;
59 }
60 ELM_MAIN()