2 * Tested interface: AtkAction
4 * Tested AtkObject: EailBubble
6 * Description: Test AtkAction interface
8 * Test input: accessible object representing EailBubble
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
18 #include "eail_test_utils.h"
20 #define ACTIONS_NUMBER 1
22 INIT_TEST("EailBubble")
25 _bubble_clicked(void *data, Evas_Object *obj, void *event_info)
27 static unsigned char counter = 0;
32 elm_bubble_pos_set(obj, counter);
38 _init_bubble(Evas_Object *win)
40 Evas_Object *bg, *label, *icon, *bubble;
43 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
44 elm_win_resize_object_add(win, bg);
47 label = elm_label_add(win);
48 elm_object_text_set(label, "This is the CONTENT of our bubble");
49 evas_object_show(label);
51 icon = elm_icon_add(win);
52 elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
53 elm_icon_standard_set(icon, "home");
54 evas_object_show(icon);
56 bubble = elm_bubble_add(win);
57 elm_object_part_content_set(bubble, "icon", icon);
58 elm_object_part_text_set(bubble, "info", "INFO");
59 elm_object_text_set(bubble, "LABEL");
60 elm_object_content_set(bubble, label);
61 evas_object_smart_callback_add(bubble, "clicked", _bubble_clicked, NULL);
62 evas_object_resize(bubble, 300, 100);
63 evas_object_show(bubble);
67 _do_test(AtkObject *obj)
69 g_assert(ATK_IS_ACTION(obj));
71 g_assert(ACTIONS_NUMBER == atk_action_get_n_actions(ATK_ACTION(obj)));
73 eailu_test_action_activate(ATK_ACTION(obj), "click");
75 g_assert(-1 == (eailu_get_action_number(ATK_ACTION(obj), "typo")));
77 eailu_test_action_description_all(ATK_ACTION(obj));
79 eailu_test_code_called = 1;
83 elm_main(int argc, char **argv)
87 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
90 evas_object_show(win);