1 | #include <gtk/gtk.h> |
---|---|
2 | |
3 | static void |
4 | image_role (void) |
5 | { |
6 | GtkWidget *widget = gtk_image_new (); |
7 | g_object_ref_sink (widget); |
8 | |
9 | gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG); |
10 | |
11 | g_object_unref (object: widget); |
12 | } |
13 | |
14 | static void |
15 | picture_role (void) |
16 | { |
17 | GtkWidget *widget = gtk_picture_new (); |
18 | g_object_ref_sink (widget); |
19 | |
20 | gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG); |
21 | |
22 | g_object_unref (object: widget); |
23 | } |
24 | |
25 | int |
26 | main (int argc, char *argv[]) |
27 | { |
28 | gtk_test_init (argcp: &argc, argvp: &argv, NULL); |
29 | |
30 | g_test_add_func (testpath: "/a11y/image/role", test_func: image_role); |
31 | g_test_add_func (testpath: "/a11y/picture/role", test_func: picture_role); |
32 | |
33 | return g_test_run (); |
34 | } |
35 |