Add another a11y test
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 Jun 2023 16:35:36 +0000 (12:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Jun 2023 22:30:41 +0000 (18:30 -0400)
testsuite/a11y/box.c [new file with mode: 0644]
testsuite/a11y/meson.build

diff --git a/testsuite/a11y/box.c b/testsuite/a11y/box.c
new file mode 100644 (file)
index 0000000..424cd23
--- /dev/null
@@ -0,0 +1,22 @@
+#include <gtk/gtk.h>
+
+static void
+box_role (void)
+{
+  GtkWidget *widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  g_object_ref_sink (widget);
+
+  gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_GENERIC);
+
+  g_object_unref (widget);
+}
+
+int
+main (int argc, char *argv[])
+{
+  gtk_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/a11y/box/role", box_role);
+
+  return g_test_run ();
+}
index fdb6da1f4b34b2cdc4cedb490e5b66b679ffb934..d8b370d7a3828caa5ef07cd3323e39a0bd6c1943 100644 (file)
@@ -8,6 +8,7 @@
 #  - 'suites': (array): additional test suites
 tests = [
   { 'name': 'accessible' },
+  { 'name': 'box' },
   { 'name': 'button' },
   { 'name': 'checkbutton' },
   { 'name': 'dialog' },