2 * Tested interface: AtkObject
4 * Tested AtkObject: EailWeb
6 * Description: Test AtkObject interface
8 * Test input: accessible object representing EailWeb
10 * Expected test result: test should return 0 (success)
13 #include <Elementary.h>
16 #include "eail_test_utils.h"
21 _do_test(AtkObject *obj)
25 atk_object_set_description(obj, "test");
26 g_assert_cmpstr(atk_object_get_description(obj), ==, "test");
28 atk_object_set_name(obj, "test name");
29 g_assert_cmpstr(atk_object_get_name(obj), ==, "test name");
31 child_count = atk_object_get_n_accessible_children(obj);
32 g_assert(child_count == 0);
34 eailu_test_atk_focus(obj, TRUE);
36 _printf("DONE. All WEB tests passed successfully \n");
37 eailu_test_code_called = 1;
41 _default_web_content_set(Evas_Object *web)
43 #ifdef HAVE_ELEMENTARY_WEB
44 Evas_Object *view, *frame;
45 const char contents[] = ""
48 " <title>Nothing to see here, move along</title>\n"
51 " <a href=\"http://www.enlightenment.org\" target=\"_blank\">E</a>\n"
53 " <a href=\"http://www.google.com\" target=\"_blank\">Google</a>\n"
58 view = elm_web_webkit_view_get(web);
59 frame = ewk_view_frame_main_get(view);
60 ewk_frame_contents_set(frame, contents, sizeof(contents) - 1, "text/html",
63 _printf("Webview could not be initialized - NO WEBKIT SUPPORT ON PLATFORM\n");
64 _printf("However still raw web widget implementation CAN be tested \n");
70 _init_webview(Evas_Object *win)
72 Evas_Object *web;//, *box;
74 web = elm_web_add(win);
75 evas_object_size_hint_weight_set(web, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
76 evas_object_size_hint_align_set(web, EVAS_HINT_FILL, 0.5);
77 _default_web_content_set(web);
79 evas_object_show(web);
83 elm_main(int argc, char **argv)
87 win = eailu_create_test_window_with_glib_init(NULL, _on_focus_in);
90 evas_object_show(win);