[gtk/matthiasc/a11y-buildable: 6/6] a11y: Add some parser tests




commit 0fddf73ddb7cf2788cd6710cfce1ede91ed5c746
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Oct 25 13:01:44 2020 -0400

    a11y: Add some parser tests
    
    Checking basic support for acessible states, properties
    and relations in ui files.

 testsuite/gtk/ui/a11y1.expected |  1 +
 testsuite/gtk/ui/a11y1.ui       | 15 +++++++++++++++
 testsuite/gtk/ui/a11y2.expected |  1 +
 testsuite/gtk/ui/a11y2.ui       | 30 ++++++++++++++++++++++++++++++
 testsuite/gtk/ui/a11y3.expected |  1 +
 testsuite/gtk/ui/a11y3.ui       | 16 ++++++++++++++++
 6 files changed, 64 insertions(+)
---
diff --git a/testsuite/gtk/ui/a11y1.expected b/testsuite/gtk/ui/a11y1.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y1.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y1.ui b/testsuite/gtk/ui/a11y1.ui
new file mode 100644
index 0000000000..e185ca9842
--- /dev/null
+++ b/testsuite/gtk/ui/a11y1.ui
@@ -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>
diff --git a/testsuite/gtk/ui/a11y2.expected b/testsuite/gtk/ui/a11y2.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y2.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y2.ui b/testsuite/gtk/ui/a11y2.ui
new file mode 100644
index 0000000000..8dc8bbfb15
--- /dev/null
+++ b/testsuite/gtk/ui/a11y2.ui
@@ -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>
diff --git a/testsuite/gtk/ui/a11y3.expected b/testsuite/gtk/ui/a11y3.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y3.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y3.ui b/testsuite/gtk/ui/a11y3.ui
new file mode 100644
index 0000000000..1979f9bbb7
--- /dev/null
+++ b/testsuite/gtk/ui/a11y3.ui
@@ -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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]