2 * Tested interface: AtkObject
4 * Tested AtkObject: EailColorselector
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailColorselector
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
18 INIT_TEST("EailColorselector")
21 _init_colorselector(Evas_Object *obj)
23 Evas_Object *bx = NULL;
24 Evas_Object *cs = NULL;
25 Evas_Object *fr = NULL;
27 bx = elm_box_add(obj);
28 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
29 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
30 elm_win_resize_object_add(obj, bx);
33 fr = elm_frame_add(obj);
34 evas_object_size_hint_weight_set(fr, 1.0, 0.5);
35 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
36 elm_object_text_set(fr, "Color Selector");
37 elm_box_pack_end(bx, fr);
40 cs = elm_colorselector_add(obj);
41 elm_colorselector_palette_name_set(cs, "painting");
42 evas_object_size_hint_weight_set(cs, EVAS_HINT_EXPAND, 0.0);
43 evas_object_size_hint_align_set(cs, EVAS_HINT_FILL, 0.0);
44 elm_colorselector_color_set(cs, 100, 100, 100, 133);
46 elm_object_content_set(fr, cs);
48 evas_object_resize(obj, 320, 480);
52 _do_test(AtkObject *obj)
54 g_assert(ATK_IS_OBJECT(obj));
55 g_assert(atk_object_get_role(obj) == ATK_ROLE_COLOR_CHOOSER);
57 atk_object_set_description(obj, "test");
58 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
60 atk_object_set_name(obj, "test name");
61 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
63 eailu_test_code_called = 1;
68 elm_main(int argc, char **argv)
70 Evas_Object *win = NULL;
72 win = eailu_create_test_window_with_glib_init(NULL, _on_focus_in);
73 _init_colorselector(win);
74 evas_object_show(win);