diff options
Diffstat (limited to 'testsuite/gtk')
-rw-r--r-- | testsuite/gtk/accessible.c | 49 | ||||
-rw-r--r-- | testsuite/gtk/builder.c | 37 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/widget-factory.ui | 21 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/widget-factory2.ui | 21 | ||||
-rw-r--r-- | testsuite/gtk/focus-chain/widget-factory3.ui | 21 | ||||
-rw-r--r-- | testsuite/gtk/meson.build | 1 | ||||
-rw-r--r-- | testsuite/gtk/notify.c | 6 |
7 files changed, 4 insertions, 152 deletions
diff --git a/testsuite/gtk/accessible.c b/testsuite/gtk/accessible.c deleted file mode 100644 index 5671e536a4..0000000000 --- a/testsuite/gtk/accessible.c +++ /dev/null @@ -1,49 +0,0 @@ -#include <gtk/gtk.h> - -static void -test_type (gconstpointer data) -{ - GType t = *(GType *)data; - GtkWidget *w; - AtkObject *a; - - w = (GtkWidget *)g_object_new (t, NULL); - if (g_type_is_a (t, G_TYPE_INITIALLY_UNOWNED)) - g_object_ref_sink (w); - - a = gtk_widget_get_accessible (w); - - g_assert (GTK_IS_ACCESSIBLE (a)); - g_assert (gtk_accessible_get_widget (GTK_ACCESSIBLE (a)) == w); - - g_object_unref (w); -} - -int -main (int argc, char *argv[]) -{ - const GType *tp; - guint i, n; - - gtk_test_init (&argc, &argv, NULL); - gtk_test_register_all_types (); - - tp = gtk_test_list_all_types (&n); - - for (i = 0; i < n; i++) - { - char *testname; - - if (!g_type_is_a (tp[i], GTK_TYPE_WIDGET) || - G_TYPE_IS_ABSTRACT (tp[i]) || - !G_TYPE_IS_INSTANTIATABLE (tp[i])) - continue; - - testname = g_strdup_printf ("/Accessible/%s", g_type_name (tp[i])); - g_test_add_data_func (testname, &tp[i], test_type); - - g_free (testname); - } - - return g_test_run (); -} diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index 8d8f9e3d01..6e514d4e55 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -1432,22 +1432,10 @@ test_widget (void) " <property name=\"orientation\">vertical</property>" " <child>" " <object class=\"GtkLabel\" id=\"label1\">" - " <child internal-child=\"accessible\">" - " <object class=\"AtkObject\" id=\"a11y-label1\">" - " <property name=\"AtkObject::accessible-name\">A Label</property>" - " </object>" - " </child>" - " <accessibility>" - " <relation target=\"button1\" type=\"label-for\"/>" - " </accessibility>" " </object>" " </child>" " <child>" " <object class=\"GtkButton\" id=\"button1\">" - " <accessibility>" - " <action action_name=\"click\" description=\"Sliff\"/>" - " <action action_name=\"clack\" translatable=\"yes\">Sniff</action>" - " </accessibility>" " </object>" " </child>" " </object>" @@ -1460,19 +1448,12 @@ test_widget (void) " <child>" " <object class=\"GtkLabel\" id=\"label1\">" " <property name=\"label\">Thelabel</property>" - " <accessibility>" - " <role type=\"static\"/>" - " </accessibility>" " </object>" " </child>" " </object>" "</interface>"; GtkBuilder *builder; GObject *window1, *button1, *label1; - AtkObject *accessible; - AtkRelationSet *relation_set; - AtkRelation *relation; - char *name; builder = builder_new_from_string (buffer, -1, NULL); button1 = gtk_builder_get_object (builder, "button1"); @@ -1494,28 +1475,14 @@ test_widget (void) window1 = gtk_builder_get_object (builder, "window1"); label1 = gtk_builder_get_object (builder, "label1"); + g_assert (GTK_IS_LABEL (label1)); - accessible = gtk_widget_get_accessible (GTK_WIDGET (label1)); - relation_set = atk_object_ref_relation_set (accessible); - g_assert_cmpint (atk_relation_set_get_n_relations (relation_set), ==, 1); - relation = atk_relation_set_get_relation (relation_set, 0); - g_assert (relation != NULL); - g_assert_true (ATK_IS_RELATION (relation)); - g_assert_cmpint (atk_relation_get_relation_type (relation), !=, ATK_RELATION_LABELLED_BY); - g_object_unref (relation_set); - - g_object_get (G_OBJECT (accessible), "accessible-name", &name, NULL); - g_assert_cmpstr (name, ==, "A Label"); - g_free (name); - gtk_window_destroy (GTK_WINDOW (window1)); g_object_unref (builder); builder = builder_new_from_string (buffer4, -1, NULL); label1 = gtk_builder_get_object (builder, "label1"); - - accessible = gtk_widget_get_accessible (GTK_WIDGET (label1)); - g_assert (atk_object_get_role (accessible) == ATK_ROLE_STATIC); + g_assert (GTK_IS_LABEL (label1)); g_object_unref (builder); } diff --git a/testsuite/gtk/focus-chain/widget-factory.ui b/testsuite/gtk/focus-chain/widget-factory.ui index ff594c9eca..bf09b8732b 100644 --- a/testsuite/gtk/focus-chain/widget-factory.ui +++ b/testsuite/gtk/focus-chain/widget-factory.ui @@ -2908,9 +2908,6 @@ bad things might happen.</property> <property name="margin-top">20</property> <property name="margin-bottom">20</property> <property name="label" translatable="yes">To free the princess, you have to slay the dragon.</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3110,9 +3107,6 @@ bad things might happen.</property> <object class="GtkLabel" id="title_label"> <property name="label">Title:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_entry"/> - </accessibility> </object> </child> <child> @@ -3120,9 +3114,6 @@ bad things might happen.</property> <property name="valign">start</property> <property name="label">Description:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_textview"/> - </accessibility> <layout> <property name="top-attach">1</property> </layout> @@ -3138,9 +3129,6 @@ bad things might happen.</property> <property name="max-content-width">100</property> <child> <object class="GtkTextView" id="open_popover_textview"> - <accessibility> - <relation type="labelled-by" target="description_label"/> - </accessibility> </object> </child> <layout> @@ -3153,9 +3141,6 @@ bad things might happen.</property> <child> <object class="GtkEntry" id="open_popover_entry"> <property name="activates-default">1</property> - <accessibility> - <relation type="labelled-by" target="title_label"/> - </accessibility> <layout> <property name="left-attach">1</property> <property name="column-span">2</property> @@ -3234,9 +3219,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">No updates at this time</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3245,9 +3227,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">You're in too deep!</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> diff --git a/testsuite/gtk/focus-chain/widget-factory2.ui b/testsuite/gtk/focus-chain/widget-factory2.ui index f0456fb3ed..abe48c0222 100644 --- a/testsuite/gtk/focus-chain/widget-factory2.ui +++ b/testsuite/gtk/focus-chain/widget-factory2.ui @@ -2909,9 +2909,6 @@ bad things might happen.</property> <property name="margin-top">20</property> <property name="margin-bottom">20</property> <property name="label" translatable="yes">To free the princess, you have to slay the dragon.</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3111,9 +3108,6 @@ bad things might happen.</property> <object class="GtkLabel" id="title_label"> <property name="label">Title:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_entry"/> - </accessibility> </object> </child> <child> @@ -3121,9 +3115,6 @@ bad things might happen.</property> <property name="valign">start</property> <property name="label">Description:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_textview"/> - </accessibility> <layout> <property name="top-attach">1</property> </layout> @@ -3139,9 +3130,6 @@ bad things might happen.</property> <property name="max-content-width">100</property> <child> <object class="GtkTextView" id="open_popover_textview"> - <accessibility> - <relation type="labelled-by" target="description_label"/> - </accessibility> </object> </child> <layout> @@ -3154,9 +3142,6 @@ bad things might happen.</property> <child> <object class="GtkEntry" id="open_popover_entry"> <property name="activates-default">1</property> - <accessibility> - <relation type="labelled-by" target="title_label"/> - </accessibility> <layout> <property name="left-attach">1</property> <property name="column-span">2</property> @@ -3235,9 +3220,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">No updates at this time</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3246,9 +3228,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">You're in too deep!</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> diff --git a/testsuite/gtk/focus-chain/widget-factory3.ui b/testsuite/gtk/focus-chain/widget-factory3.ui index c4e4b679c3..02c485c4b7 100644 --- a/testsuite/gtk/focus-chain/widget-factory3.ui +++ b/testsuite/gtk/focus-chain/widget-factory3.ui @@ -2909,9 +2909,6 @@ bad things might happen.</property> <property name="margin-top">20</property> <property name="margin-bottom">20</property> <property name="label" translatable="yes">To free the princess, you have to slay the dragon.</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3111,9 +3108,6 @@ bad things might happen.</property> <object class="GtkLabel" id="title_label"> <property name="label">Title:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_entry"/> - </accessibility> </object> </child> <child> @@ -3121,9 +3115,6 @@ bad things might happen.</property> <property name="valign">start</property> <property name="label">Description:</property> <property name="xalign">1</property> - <accessibility> - <relation type="label-for" target="open_popover_textview"/> - </accessibility> <layout> <property name="top-attach">1</property> </layout> @@ -3139,9 +3130,6 @@ bad things might happen.</property> <property name="max-content-width">100</property> <child> <object class="GtkTextView" id="open_popover_textview"> - <accessibility> - <relation type="labelled-by" target="description_label"/> - </accessibility> </object> </child> <layout> @@ -3154,9 +3142,6 @@ bad things might happen.</property> <child> <object class="GtkEntry" id="open_popover_entry"> <property name="activates-default">1</property> - <accessibility> - <relation type="labelled-by" target="title_label"/> - </accessibility> <layout> <property name="left-attach">1</property> <property name="column-span">2</property> @@ -3235,9 +3220,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">No updates at this time</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> @@ -3246,9 +3228,6 @@ bad things might happen.</property> <child> <object class="GtkLabel"> <property name="label">You're in too deep!</property> - <accessibility> - <role type="static"/> - </accessibility> </object> </child> </object> diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build index f5815ea210..5063bb474f 100644 --- a/testsuite/gtk/meson.build +++ b/testsuite/gtk/meson.build @@ -21,7 +21,6 @@ endif # - 'suites': (array): additional test suites tests = [ { 'name': 'accel' }, - { 'name': 'accessible' }, { 'name': 'action' }, { 'name': 'adjustment' }, { 'name': 'bitset' }, diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index dda0f22d2b..58527375cf 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -373,8 +373,7 @@ test_type (gconstpointer data) return; /* non-GTK+ */ - if (g_str_equal (g_type_name (type), "AtkObject") || - g_str_equal (g_type_name (type), "GdkPixbufSimpleAnim")) + if (g_str_equal (g_type_name (type), "GdkPixbufSimpleAnim")) return; /* Deprecated, not getting fixed */ @@ -505,8 +504,7 @@ test_type (gconstpointer data) continue; /* non-GTK+ */ - if (g_str_equal (g_type_name (pspec->owner_type), "AtkObject") || - g_str_equal (g_type_name (pspec->owner_type), "GdkPixbufSimpleAnim") || + if (g_str_equal (g_type_name (pspec->owner_type), "GdkPixbufSimpleAnim") || g_str_equal (g_type_name (pspec->owner_type), "GMountOperation")) continue; |