2 * Tested interface: AtkObject
4 * Tested AtkObject: EailPhotocam
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailPhotocam
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
18 #include "eail_test_utils.h"
20 INIT_TEST("EailPhotocam");
23 _do_test(AtkObject *obj)
25 g_assert(ATK_IS_OBJECT(obj));
26 atk_object_set_description(obj, "test");
27 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
29 atk_object_set_name(obj, "test name");
30 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
32 AtkStateSet *state_set = atk_object_ref_state_set(obj);
34 g_assert(!atk_state_set_is_empty(state_set));
36 g_object_unref(state_set);
38 eailu_test_code_called = 1;
42 _init_photocam(Evas_Object *win)
44 Evas_Object *bg, *photocam;
45 const char * const filename = "./data/whiterabbit01.jpg";
48 elm_bg_color_set(bg, 255, 255, 255);
49 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
50 elm_win_resize_object_add(win, bg);
53 photocam = elm_photocam_add(win);
54 g_assert(EVAS_LOAD_ERROR_NONE == elm_photocam_file_set(photocam, filename));
55 elm_scroller_bounce_set(photocam, EINA_FALSE, EINA_TRUE);
56 evas_object_resize(photocam, 300, 300);
57 evas_object_show(photocam);
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);