[gtk+] Add a test for setting accessible name from gtkbuilder



commit fbb1ee02bc6bd994a6566667ee0d5d75ad421e9a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 10 15:22:24 2013 -0500

    Add a test for setting accessible name from gtkbuilder
    
    This is wrongly documented in the GtkWidget docs.

 tests/a11y/buttons.txt |   24 +++++++++++++++++++-----
 tests/a11y/buttons.ui  |   17 +++++++++++++++++
 2 files changed, 36 insertions(+), 5 deletions(-)
---
diff --git a/tests/a11y/buttons.txt b/tests/a11y/buttons.txt
index 075e275..6b1fd88 100644
--- a/tests/a11y/buttons.txt
+++ b/tests/a11y/buttons.txt
@@ -15,10 +15,24 @@ window1
     <AtkComponent>
     layer: widget
     alpha: 1
-    button5
+    button6
       "toggle button"
       parent: grid1
       index: 0
+      name: Test switch
+      description: Switches between on and off states
+      state: enabled focusable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: widget
+      alpha: 1
+      <AtkAction>
+      action 0 name: toggle
+      action 0 description: Toggles the switch
+    button5
+      "toggle button"
+      parent: grid1
+      index: 1
       name: Switch
       description: Switches between on and off states
       state: checked enabled focusable sensitive showing visible
@@ -32,7 +46,7 @@ window1
     button4
       "radio button"
       parent: grid1
-      index: 1
+      index: 2
       name: Hello World!
       member-of: button4
                  button3
@@ -50,7 +64,7 @@ window1
     button3
       "radio button"
       parent: grid1
-      index: 2
+      index: 3
       name: Hello World!
       member-of: button4
                  button3
@@ -68,7 +82,7 @@ window1
     button2
       "check box"
       parent: grid1
-      index: 3
+      index: 4
       name: Hello World!
       state: enabled focusable sensitive showing visible
       toolkit: gtk
@@ -84,7 +98,7 @@ window1
     button1
       "toggle button"
       parent: grid1
-      index: 4
+      index: 5
       name: Hello World!
       state: armed checked enabled focusable sensitive showing visible
       toolkit: gtk
diff --git a/tests/a11y/buttons.ui b/tests/a11y/buttons.ui
index 88cbc0d..b229bbb 100644
--- a/tests/a11y/buttons.ui
+++ b/tests/a11y/buttons.ui
@@ -72,6 +72,23 @@
             <property name="top_attach">0</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkSwitch" id="button6">
+            <property name="visible">True</property>
+            <property name="active">False</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <child internal-child="accessible">
+              <object class="AtkObject" id="button6-accessible">
+                <property name="accessible-name">Test switch</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">5</property>
+            <property name="top_attach">0</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>


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