a11y: Add some parser tests

Checking basic support for acessible states, properties
and relations in ui files.
This commit is contained in:
Matthias Clasen 2020-10-25 13:01:44 -04:00
parent f981ab7a9e
commit 0fddf73ddb
6 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1 @@
SUCCESS

15
testsuite/gtk/ui/a11y1.ui Normal file
View File

@ -0,0 +1,15 @@
<!-- test accessible states with a variety of values -->
<interface>
<object class="GtkButton">
<accessibility>
<state name="busy">t</state>
<state name="checked">mixed</state>
<state name="disabled">true</state>
<state name="expanded">undefined</state>
<state name="hidden">True</state>
<state name="invalid">grammar</state>
<state name="pressed">undefined</state>
<state name="selected">0</state>
</accessibility>
</object>
</interface>

View File

@ -0,0 +1 @@
SUCCESS

30
testsuite/gtk/ui/a11y2.ui Normal file
View File

@ -0,0 +1,30 @@
<interface>
<!-- test some accessible properties -->
<object class="GtkBox">
<child>
<object class="GtkButton">
<accessibility>
<property name="autocomplete">both</property>
<property name="description" translatable="yes">Bah</property>
<property name="has-popup">1</property>
<property name="key-shortcuts">shortcuts go here</property>
<property name="label" translatable="yes">label?</property>
<property name="level">99</property>
<property name="modal">no</property>
<property name="multi-line">0</property>
<property name="multi-selectable">false</property>
<property name="orientation">horizontal</property>
<property name="placeholder" translatable="yes">placeholder?</property>
<property name="read-only">F</property>
<property name="required">False</property>
<property name="role-description">Dunno</property>
<property name="sort">ascending</property>
<property name="value-max">11</property>
<property name="value-min">0</property>
<property name="value-now">10</property>
<property name="value-text" translatable="yes">Ten</property>
</accessibility>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1 @@
SUCCESS

16
testsuite/gtk/ui/a11y3.ui Normal file
View File

@ -0,0 +1,16 @@
<!-- test accessible relations -->
<interface>
<object class="GtkBox">
<child>
<object class="GtkButton">
<accessibility>
<relation name="labelled-by">label</relation>
<relation name="controls">label</relation>
</accessibility>
</object>
</child>
<child>
<object class="GtkLabel" id="label"/>
</child>
</object>
</interface>