2 * Tested interface: AtkAction
4 * Tested AtkObject: EailThumb
6 * Description: Test AtkAction interface
8 * Test input: accessible object representing EailThumb
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
18 #define ACTIONS_NUMBER 1
20 INIT_TEST("EailThumb")
23 _init_thumb(Evas_Object *win)
25 const char *filename = "./data/06.jpg";
26 Evas_Object *bg, *thumb;
31 elm_win_resize_object_add(win, bg);
32 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
35 thumb = elm_thumb_add(win);
36 elm_thumb_editable_set(thumb, EINA_FALSE);
37 elm_thumb_file_set(thumb, filename, NULL);
38 elm_thumb_reload(thumb);
39 evas_object_size_hint_weight_set(thumb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
40 elm_win_resize_object_add(win, thumb);
41 evas_object_show(thumb);
45 _do_test(AtkObject *obj)
47 g_assert(ATK_IS_ACTION(obj));
49 g_assert(ACTIONS_NUMBER == atk_action_get_n_actions(ATK_ACTION(obj)));
51 eailu_test_action_activate(ATK_ACTION(obj), "click");
53 g_assert(-1 == (eailu_get_action_number(ATK_ACTION(obj), "typo")));
55 eailu_test_action_description_all(ATK_ACTION(obj));
57 eailu_test_code_called = 1;
61 elm_main(int argc, char **argv)
65 win = eailu_create_test_window_with_glib_init(_on_done, _on_focus_in);
68 evas_object_show(win);