From b84650c2a32aa847784f4be5e71b75b5b6681a88 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Jun 2023 12:35:36 -0400 Subject: [PATCH] Add another a11y test --- testsuite/a11y/box.c | 22 ++++++++++++++++++++++ testsuite/a11y/meson.build | 1 + 2 files changed, 23 insertions(+) create mode 100644 testsuite/a11y/box.c diff --git a/testsuite/a11y/box.c b/testsuite/a11y/box.c new file mode 100644 index 0000000000..424cd23437 --- /dev/null +++ b/testsuite/a11y/box.c @@ -0,0 +1,22 @@ +#include + +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 (); +} diff --git a/testsuite/a11y/meson.build b/testsuite/a11y/meson.build index fdb6da1f4b..d8b370d7a3 100644 --- a/testsuite/a11y/meson.build +++ b/testsuite/a11y/meson.build @@ -8,6 +8,7 @@ # - 'suites': (array): additional test suites tests = [ { 'name': 'accessible' }, + { 'name': 'box' }, { 'name': 'button' }, { 'name': 'checkbutton' }, { 'name': 'dialog' }, -- 2.30.2