forked from AuroraMiddleware/gtk
a11y: Add separator tests
Tests the fix in the previous commit.
This commit is contained in:
parent
d8ac144923
commit
2cbaa568b5
@ -15,6 +15,7 @@ tests = [
|
||||
{ 'name': 'checkbutton' },
|
||||
{ 'name': 'dialog' },
|
||||
{ 'name': 'progressbar' },
|
||||
{ 'name': 'separator' },
|
||||
{ 'name': 'window' },
|
||||
]
|
||||
|
||||
|
38
testsuite/a11y/separator.c
Normal file
38
testsuite/a11y/separator.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
separator_role (void)
|
||||
{
|
||||
GtkWidget *widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
g_object_ref_sink (widget);
|
||||
|
||||
gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_SEPARATOR);
|
||||
|
||||
g_object_unref (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
separator_properties (void)
|
||||
{
|
||||
GtkWidget *widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
g_object_ref_sink (widget);
|
||||
|
||||
gtk_test_accessible_assert_property (widget, GTK_ACCESSIBLE_PROPERTY_ORIENTATION, GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (widget), GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gtk_test_accessible_assert_property (widget, GTK_ACCESSIBLE_PROPERTY_ORIENTATION, GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
g_object_unref (widget);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_test_add_func ("/a11y/separator/role", separator_role);
|
||||
g_test_add_func ("/a11y/separator/properties", separator_properties);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user