Add some more a11y tests
Check that the hidden state is as it should be.
This commit is contained in:
@@ -42,6 +42,26 @@ button_relation (void)
|
||||
g_object_unref (button);
|
||||
}
|
||||
|
||||
static void
|
||||
button_state (void)
|
||||
{
|
||||
GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello");
|
||||
|
||||
g_object_ref_sink (button);
|
||||
|
||||
gtk_test_accessible_assert_state (GTK_ACCESSIBLE (button),
|
||||
GTK_ACCESSIBLE_STATE_HIDDEN, button, FALSE,
|
||||
-1);
|
||||
|
||||
gtk_widget_set_visible (button, FALSE);
|
||||
|
||||
gtk_test_accessible_assert_state (GTK_ACCESSIBLE (button),
|
||||
GTK_ACCESSIBLE_STATE_HIDDEN, button, TRUE,
|
||||
-1);
|
||||
|
||||
g_object_unref (button);
|
||||
}
|
||||
|
||||
static void
|
||||
linkbutton_role (void)
|
||||
{
|
||||
@@ -73,6 +93,7 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/a11y/button/role", button_role);
|
||||
g_test_add_func ("/a11y/button/label", button_label);
|
||||
g_test_add_func ("/a11y/button/relation", button_relation);
|
||||
g_test_add_func ("/a11y/button/state", button_state);
|
||||
g_test_add_func ("/a11y/linkbutton/role", linkbutton_role);
|
||||
g_test_add_func ("/a11y/linkbutton/label", linkbutton_label);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user