[gtk+/font-chooser] tests: Add a test for menus



commit b10ae7101fcbf6d496535db20fe266c1b08256a0
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 11 03:10:04 2011 +0200

    tests: Add a test for menus

 tests/a11y/Makefile.am |    3 +-
 tests/a11y/menu.txt    |  297 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/a11y/menu.ui     |  230 +++++++++++++++++++++++++++++++++++++
 3 files changed, 529 insertions(+), 1 deletions(-)
---
diff --git a/tests/a11y/Makefile.am b/tests/a11y/Makefile.am
index 817c584..1fcd5eb 100644
--- a/tests/a11y/Makefile.am
+++ b/tests/a11y/Makefile.am
@@ -56,4 +56,5 @@ EXTRA_DIST += \
 	iconview.ui iconview.txt \
 	entries.ui entries.txt \
 	scale-drawvalue.ui scale-drawvalue.txt \
-	placeholder-text.ui placeholder-text.txt
+	placeholder-text.ui placeholder-text.txt \
+	menu.ui menu.txt
diff --git a/tests/a11y/menu.txt b/tests/a11y/menu.txt
new file mode 100644
index 0000000..f7e3d44
--- /dev/null
+++ b/tests/a11y/menu.txt
@@ -0,0 +1,297 @@
+window1
+  "frame"
+  index: 0
+  state: enabled resizable sensitive showing visible
+  toolkit: gtk
+  <AtkComponent>
+  layer: window
+  alpha: 1
+  menubar1
+    "menu bar"
+    parent: window1
+    index: 0
+    state: enabled sensitive showing visible
+    toolkit: gtk
+    <AtkComponent>
+    layer: widget
+    alpha: 1
+    <AtkSelection>
+    menuitem1
+      "menu"
+      parent: menubar1
+      index: 0
+      name: File
+      state: enabled selectable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: popup
+      alpha: 1
+      <AtkAction>
+      action 0 name: click
+      action 0 keybinding: <Alt>f;<Alt>f;
+      <AtkSelection>
+      imagemenuitem1
+        "menu item"
+        parent: menuitem1
+        index: 0
+        name: New
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: n;<Alt>f:n;
+        <AtkSelection>
+      imagemenuitem2
+        "menu"
+        parent: menuitem1
+        index: 1
+        name: Open
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: o;<Alt>f:o;
+        <AtkSelection>
+        radiomenuitem1
+          "radio menu item"
+          parent: imagemenuitem2
+          index: 0
+          name: One
+          member-of: radiomenuitem3
+                     radiomenuitem2
+                     radiomenuitem1
+          state: checked enabled selectable sensitive visible
+          toolkit: gtk
+          <AtkComponent>
+          layer: popup
+          alpha: 1
+          <AtkAction>
+          action 0 name: click
+          <AtkSelection>
+        radiomenuitem2
+          "radio menu item"
+          parent: imagemenuitem2
+          index: 1
+          name: Two
+          member-of: radiomenuitem3
+                     radiomenuitem2
+                     radiomenuitem1
+          state: enabled selectable sensitive visible
+          toolkit: gtk
+          <AtkComponent>
+          layer: popup
+          alpha: 1
+          <AtkAction>
+          action 0 name: click
+          <AtkSelection>
+        radiomenuitem3
+          "radio menu item"
+          parent: imagemenuitem2
+          index: 2
+          name: Three
+          member-of: radiomenuitem3
+                     radiomenuitem2
+                     radiomenuitem1
+          state: enabled selectable sensitive visible
+          toolkit: gtk
+          <AtkComponent>
+          layer: popup
+          alpha: 1
+          <AtkAction>
+          action 0 name: click
+          <AtkSelection>
+      imagemenuitem3
+        "menu item"
+        parent: menuitem1
+        index: 2
+        name: Save
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: s;<Alt>f:s;
+        <AtkSelection>
+      imagemenuitem4
+        "menu item"
+        parent: menuitem1
+        index: 3
+        name: Save As
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: a;<Alt>f:a;
+        <AtkSelection>
+      separatormenuitem1
+        "separator"
+        parent: menuitem1
+        index: 4
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        <AtkSelection>
+      checkmenuitem1
+        "check menu item"
+        parent: menuitem1
+        index: 5
+        name: awesome
+        state: selectable sensitive visible indeterminate
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        <AtkSelection>
+      separatormenuitem2
+        "separator"
+        parent: menuitem1
+        index: 6
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        <AtkSelection>
+      imagemenuitem5
+        "menu item"
+        parent: menuitem1
+        index: 7
+        name: Quit
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: q;<Alt>f:q;
+        <AtkSelection>
+    menuitem2
+      "menu"
+      parent: menubar1
+      index: 1
+      name: Edit
+      state: enabled selectable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: popup
+      alpha: 1
+      <AtkAction>
+      action 0 name: click
+      action 0 keybinding: <Alt>e;<Alt>e;
+      <AtkSelection>
+      imagemenuitem6
+        "menu item"
+        parent: menuitem2
+        index: 0
+        name: Cut
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: t;<Alt>e:t;
+        <AtkSelection>
+      imagemenuitem7
+        "menu item"
+        parent: menuitem2
+        index: 1
+        name: Copy
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: c;<Alt>e:c;
+        <AtkSelection>
+      imagemenuitem8
+        "menu item"
+        parent: menuitem2
+        index: 2
+        name: Paste
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: p;<Alt>e:p;
+        <AtkSelection>
+      imagemenuitem9
+        "menu item"
+        parent: menuitem2
+        index: 3
+        name: Delete
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: d;<Alt>e:d;
+        <AtkSelection>
+    menuitem3
+      "menu item"
+      parent: menubar1
+      index: 2
+      name: View
+      state: enabled selectable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: popup
+      alpha: 1
+      <AtkAction>
+      action 0 name: click
+      action 0 keybinding: <Alt>v;<Alt>v;
+      <AtkSelection>
+    menuitem4
+      "menu"
+      parent: menubar1
+      index: 3
+      name: Help
+      state: enabled selectable sensitive showing visible
+      toolkit: gtk
+      <AtkComponent>
+      layer: popup
+      alpha: 1
+      <AtkAction>
+      action 0 name: click
+      action 0 keybinding: <Alt>h;<Alt>h;
+      <AtkSelection>
+      imagemenuitem10
+        "menu item"
+        parent: menuitem4
+        index: 0
+        name: About
+        state: enabled selectable sensitive visible
+        toolkit: gtk
+        <AtkComponent>
+        layer: popup
+        alpha: 1
+        <AtkAction>
+        action 0 name: click
+        action 0 keybinding: a;<Alt>h:a;
+        <AtkSelection>
diff --git a/tests/a11y/menu.ui b/tests/a11y/menu.ui
new file mode 100644
index 0000000..bb2274f
--- /dev/null
+++ b/tests/a11y/menu.ui
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <child>
+      <object class="GtkMenuBar" id="menubar1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkMenuItem" id="menuitem1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">_File</property>
+            <property name="use_underline">True</property>
+            <child type="submenu">
+              <object class="GtkMenu" id="menu1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem1">
+                    <property name="label">gtk-new</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem2">
+                    <property name="label">gtk-open</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                    <child type="submenu">
+                      <object class="GtkMenu" id="menu4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkRadioMenuItem" id="radiomenuitem1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="label" translatable="yes">One</property>
+                            <property name="use_underline">True</property>
+                            <property name="active">True</property>
+                            <property name="draw_as_radio">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkRadioMenuItem" id="radiomenuitem2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="label" translatable="yes">Two</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_as_radio">True</property>
+                            <property name="group">radiomenuitem1</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkRadioMenuItem" id="radiomenuitem3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="label" translatable="yes">Three</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_as_radio">True</property>
+                            <property name="group">radiomenuitem1</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem3">
+                    <property name="label">gtk-save</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem4">
+                    <property name="label">gtk-save-as</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkCheckMenuItem" id="checkmenuitem1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="label" translatable="yes">awesome</property>
+                    <property name="use_underline">True</property>
+                    <property name="inconsistent">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkSeparatorMenuItem" id="separatormenuitem2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem5">
+                    <property name="label">gtk-quit</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkMenuItem" id="menuitem2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">_Edit</property>
+            <property name="use_underline">True</property>
+            <child type="submenu">
+              <object class="GtkMenu" id="menu2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem6">
+                    <property name="label">gtk-cut</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem7">
+                    <property name="label">gtk-copy</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem8">
+                    <property name="label">gtk-paste</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem9">
+                    <property name="label">gtk-delete</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkMenuItem" id="menuitem3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">_View</property>
+            <property name="use_underline">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkMenuItem" id="menuitem4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="label" translatable="yes">_Help</property>
+            <property name="use_underline">True</property>
+            <child type="submenu">
+              <object class="GtkMenu" id="menu3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkImageMenuItem" id="imagemenuitem10">
+                    <property name="label">gtk-about</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="use_stock">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



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