mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
efd4169fa2
Use the img accessible role for these. Also update the documentation and add tests.
35 lines
642 B
C
35 lines
642 B
C
#include <gtk/gtk.h>
|
|
|
|
static void
|
|
image_role (void)
|
|
{
|
|
GtkWidget *widget = gtk_image_new ();
|
|
g_object_ref_sink (widget);
|
|
|
|
gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG);
|
|
|
|
g_object_unref (widget);
|
|
}
|
|
|
|
static void
|
|
picture_role (void)
|
|
{
|
|
GtkWidget *widget = gtk_picture_new ();
|
|
g_object_ref_sink (widget);
|
|
|
|
gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG);
|
|
|
|
g_object_unref (widget);
|
|
}
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
gtk_test_init (&argc, &argv, NULL);
|
|
|
|
g_test_add_func ("/a11y/image/role", image_role);
|
|
g_test_add_func ("/a11y/picture/role", picture_role);
|
|
|
|
return g_test_run ();
|
|
}
|