orca r3448 - in trunk: . test/keystrokes/firefox



Author: shaeger
Date: Fri Jan 11 20:28:20 2008
New Revision: 3448
URL: http://svn.gnome.org/viewvc/orca?rev=3448&view=rev

Log:
Updates to ARIA regression tests.


Modified:
   trunk/ChangeLog
   trunk/test/keystrokes/firefox/dojo_tree.py
   trunk/test/keystrokes/firefox/moz_checkbox.py
   trunk/test/keystrokes/firefox/moz_menu.py
   trunk/test/keystrokes/firefox/moz_progressbar.py
   trunk/test/keystrokes/firefox/moz_tabpanel.py
   trunk/test/keystrokes/firefox/uiuc_tree.py

Modified: trunk/test/keystrokes/firefox/dojo_tree.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_tree.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_tree.py	Fri Jan 11 20:28:20 2008
@@ -73,13 +73,8 @@
      "SPEECH OUTPUT: 'tree level 2'"]))
 
 ########################################################################
-########################################################################
-# Use arrows to expand/collapse/navigate tree.  The following will be presented after
-# each step.
+# Use arrows to expand/collapse/navigate tree.  
 #
-# BRAILLE LINE:  'Africa expanded ListItem LEVEL 1'
-#      VISIBLE:  'Africa expanded ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: 'expanded'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
@@ -88,11 +83,6 @@
      "     VISIBLE:  'Africa ListItem', cursor=1",
      "SPEECH OUTPUT: 'expanded'"]))
 
-# BRAILLE LINE:  'Egypt ListItem LEVEL 2'
-#      VISIBLE:  'Egypt ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Egypt list item level 2'
-# SPEECH OUTPUT: 'tree level 2'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitForFocus("Egypt", acc_role=pyatspi.ROLE_LIST_ITEM))
@@ -104,10 +94,6 @@
      "SPEECH OUTPUT: 'Egypt list item'",
      "SPEECH OUTPUT: 'tree level 3'"]))
 
-# BRAILLE LINE:  'Kenya ListItem LEVEL 2'
-#      VISIBLE:  'Kenya ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Kenya list item level 2'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(WaitForFocus("Kenya", acc_role=pyatspi.ROLE_LIST_ITEM))
@@ -118,9 +104,6 @@
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Kenya list item collapsed'"]))
 
-# BRAILLE LINE:  'Kenya expanded ListItem LEVEL 2'
-#      VISIBLE:  'Kenya expanded ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: 'expanded'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
@@ -129,9 +112,6 @@
      "     VISIBLE:  'Kenya ListItem', cursor=1",
      "SPEECH OUTPUT: 'expanded'"]))
 
-# BRAILLE LINE:  'Kenya collapsed ListItem LEVEL 2'
-#      VISIBLE:  'Kenya collapsed ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: 'collapsed'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Left"))
 sequence.append(utils.AssertPresentationAction(
@@ -140,10 +120,6 @@
      "     VISIBLE:  'Kenya ListItem', cursor=1",
      "SPEECH OUTPUT: 'collapsed'"]))
 
-# BRAILLE LINE:  'Sudan ListItem LEVEL 2'
-#      VISIBLE:  'Sudan ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Sudan list item level 2'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
@@ -153,11 +129,6 @@
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Sudan list item collapsed'"]))
 
-# BRAILLE LINE:  'Asia ListItem LEVEL 1'
-#      VISIBLE:  'Asia ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Asia list item level 1'
-# SPEECH OUTPUT: 'tree level 1'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
@@ -168,9 +139,6 @@
      "SPEECH OUTPUT: 'Asia list item collapsed'",
      "SPEECH OUTPUT: 'tree level 2'"]))
 
-# BRAILLE LINE:  'Asia expanded ListItem LEVEL 1'
-#      VISIBLE:  'Asia expanded ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: 'expanded'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
@@ -179,11 +147,6 @@
      "     VISIBLE:  'Asia ListItem', cursor=1",
      "SPEECH OUTPUT: 'expanded'"]))
 
-# BRAILLE LINE:  'China ListItem LEVEL 2'
-#      VISIBLE:  'China ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'China list item level 2'
-# SPEECH OUTPUT: 'tree level 2'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
@@ -194,10 +157,6 @@
      "SPEECH OUTPUT: 'China list item'",
      "SPEECH OUTPUT: 'tree level 3'"]))
 
-# BRAILLE LINE:  'India ListItem LEVEL 2'
-#      VISIBLE:  'India ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'India list item level 2'
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
@@ -206,10 +165,7 @@
      "     VISIBLE:  'India ListItem', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'India list item'"]))
-# BRAILLE LINE:  'Russia ListItem LEVEL 2'
-#      VISIBLE:  'Russia ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Russia list item level 2'
+
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
@@ -218,10 +174,7 @@
      "     VISIBLE:  'Russia ListItem', cursor=1",
      "SPEECH OUTPUT: ''",
      "SPEECH OUTPUT: 'Russia list item'"]))
-# BRAILLE LINE:  'Mongolia ListItem LEVEL 2'
-#      VISIBLE:  'Mongolia ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Mongolia list item level 2'
+
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(

Modified: trunk/test/keystrokes/firefox/moz_checkbox.py
==============================================================================
--- trunk/test/keystrokes/firefox/moz_checkbox.py	(original)
+++ trunk/test/keystrokes/firefox/moz_checkbox.py	Fri Jan 11 20:28:20 2008
@@ -22,93 +22,138 @@
 sequence.append(TypeAction("http://www.mozilla.org/access/dhtml/checkbox";))
 sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForDocLoad())
-sequence.append(WaitForFocus("DHTML Checkbox", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+sequence.append(WaitForFocus("ARIA Checkbox", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Tab to the first checkbox.  The following will be presented.
-#
-# BRAILLE LINE:  '<x>  Include decorative fruit basket  CheckBox'
-# VISIBLE:  '<x>  Include decorative fruit ba', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: ' Include decorative fruit basket  check box checked'
+# Tab to the first checkbox.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(" Include decorative fruit basket", acc_role=pyatspi.ROLE_CHECK_BOX))
+sequence.append(utils.AssertPresentationAction(
+    "tab to first checkbox", 
+    ["BRAILLE LINE:  '<x>  Include decorative fruit basket  CheckBox'",
+     "     VISIBLE:  '<x>  Include decorative fruit ba', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: ' Include decorative fruit basket  check box checked'"]))
 
 ########################################################################
-# Now, change its state.  The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE:  '< >  Include decorative fruit basket  CheckBox'
-#     VISIBLE:  '< >  Include decorative fruit ba', cursor=1
-# SPEECH OUTPUT: 'not checked'
+# Now, change its state.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state of first checkbox", 
+    ["BRAILLE LINE:  '< >  Include decorative fruit basket  CheckBox'",
+     "     VISIBLE:  '< >  Include decorative fruit ba', cursor=1",
+     "SPEECH OUTPUT: 'not checked'"]))
 
 ########################################################################
-# Tab to the second checkbox.  The following will be presented.
-#
-# BRAILLE LINE:  '<x>  Required checkbox  CheckBox'
-#     VISIBLE:  '<x>  Required checkbox  CheckBox', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: ' Required checkbox  check box checked'
+# Tab to the second checkbox.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(" Required checkbox", acc_role=pyatspi.ROLE_CHECK_BOX))
-
+sequence.append(utils.AssertPresentationAction(
+    "tab to second checkbox", 
+    ["BRAILLE LINE:  '<x>  Invalid checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Invalid checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: ' Invalid checkbox  check box checked'"]))
 ########################################################################
-# Now, change its state.  The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE:  '< >  Required checkbox  CheckBox'
-#     VISIBLE:  '< >  Required checkbox  CheckBox', cursor=1
-# SPEECH OUTPUT: 'not checked'
+# Now, change its state.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state of second checkbox", 
+    ["BRAILLE LINE:  '< >  Invalid checkbox  CheckBox'",
+     "     VISIBLE:  '< >  Invalid checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: 'not checked'"]))
 
 ########################################################################
-# Tab to the third checkbox.  The following will be presented.
-#
-# BRAILLE LINE:  '<x>  Invalid checkbox  CheckBox'
-#     VISIBLE:  '<x>  Invalid checkbox  CheckBox', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: ' Invalid checkbox  check box checked'
+# Tab to the third checkbox.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus(" Invalid checkbox", acc_role=pyatspi.ROLE_CHECK_BOX))
-
+sequence.append(utils.AssertPresentationAction(
+    "tab to third checkbox", 
+    ["BRAILLE LINE:  '<x>  Required checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Required checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: ' Required checkbox  check box checked'"]))
+    
 ########################################################################
-# Now, change its state.  The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE:  '< >  Invalid checkbox  CheckBox'
-#     VISIBLE:  '< >  Invalid checkbox  CheckBox', cursor=1
-# SPEECH OUTPUT: 'not checked'
+# Now, change its state.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state of third checkbox", 
+    ["BRAILLE LINE:  '< >  Required checkbox  CheckBox'",
+     "     VISIBLE:  '< >  Required checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: 'not checked'"]))
 
 ########################################################################
-# Now, change its state back.  The following should be presented in speech
-# and braille:
-#
-# BRAILLE LINE:  '<x>  Invalid checkbox  CheckBox'
-#     VISIBLE:  '<x>  Invalid checkbox  CheckBox', cursor=1
-# SPEECH OUTPUT: 'checked'
+# Now, change its state back.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "change state of third checkbox again", 
+    ["BRAILLE LINE:  '<x>  Required checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Required checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: 'checked'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  '< >  Invalid checkbox CheckBox'
-#     VISIBLE:  '< >  Invalid checkbox CheckBox', cursor=1
-# SPEECH OUTPUT: 'Invalid checkbox check box'
-# SPEECH OUTPUT: 'not checked'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  '<x>  Required checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Required checkbox  CheckBox', cursor=1",
+     "SPEECH OUTPUT: 'Required checkbox check box checked'",
+     "SPEECH OUTPUT: ''"]))
+     
+########################################################################
+# Tab to the checkbox tristate.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "tab to checkbox tristate", 
+    ["BRAILLE LINE:  '<x>  Tri-state checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Tri-state checkbox  CheckBo', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: ' Tri-state checkbox  check box checked'"]))
+    
+########################################################################
+# change checkbox tristate state three times
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "1 change state of tristate checkbox", 
+    ["BRAILLE LINE:  '< >  Tri-state checkbox  CheckBox'",
+     "     VISIBLE:  '< >  Tri-state checkbox  CheckBo', cursor=1",
+     "SPEECH OUTPUT: 'not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "2 change state of tristate checkbox", 
+    ["BRAILLE LINE:  '<->  Tri-state checkbox  CheckBox'",
+     "     VISIBLE:  '<->  Tri-state checkbox  CheckBo', cursor=1",
+     "SPEECH OUTPUT: 'partially checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "3 change state of tristate checkbox", 
+    ["BRAILLE LINE:  '<x>  Tri-state checkbox  CheckBox'",
+     "     VISIBLE:  '<x>  Tri-state checkbox  CheckBo', cursor=1",
+     "SPEECH OUTPUT: 'checked'"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/moz_menu.py
==============================================================================
--- trunk/test/keystrokes/firefox/moz_menu.py	(original)
+++ trunk/test/keystrokes/firefox/moz_menu.py	Fri Jan 11 20:28:20 2008
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
 
 """Test of Mozilla ARIA menu presentation using Firefox.
 """
@@ -22,140 +23,176 @@
 sequence.append(TypeAction("http://www.mozilla.org/access/dhtml/spreadsheet";))
 sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForDocLoad())
-sequence.append(WaitForFocus("Accessible DHTML", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+sequence.append(WaitForFocus("ARIA Spreadsheet and Menubar", 
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Move to the menu.  The following will be presented.
-#
-# BRAILLE LINE:  'Edit'
-#      VISIBLE:  'Edit', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Edit'
+# Move to the menu.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Control><Alt>m"))
-sequence.append(WaitForFocus("Edit", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "Move to the menu", 
+    ["BRAILLE LINE:  'Edit'",
+     "     VISIBLE:  'Edit', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Edit'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'Edit'
-#      VISIBLE:  'Edit', cursor=1
-# SPEECH OUTPUT: 'Edit section'
-# SPEECH OUTPUT: 'Edit'
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'item 1 of 1'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  'Edit'",
+     "     VISIBLE:  'Edit', cursor=1",
+     "SPEECH OUTPUT: 'Edit section'",
+     "SPEECH OUTPUT: 'Edit'",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'item 1 of 1'"]))
 
 ########################################################################
-########################################################################
-# Use arrows to navigate menu structure.  The following will be presented
-# for each move.
-#
-# BRAILLE LINE:  'Edit View'
-#      VISIBLE:  'Edit View', cursor=6
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'View'
+# Use arrows to navigate menu structure.
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("View", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "Move to View", 
+    ["BRAILLE LINE:  'View'",
+     "     VISIBLE:  'View', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'View'"]))
+    
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to Themes", 
+    ["BRAILLE LINE:  'Themes ÂÂ Â ÂÂ Â>'",
+     "     VISIBLE:  'Themes ÂÂ Â ÂÂ Â>', cursor=0",
+     "BRAILLE LINE:  'Themes ÂÂ Â ÂÂ Â>'",
+     "     VISIBLE:  'Themes ÂÂ Â ÂÂ Â>', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'menu'",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Themes ÂÂ Â ÂÂ Â>'"]))
 
-# Note:  accessible name needed to be removed because of unicode characters
-# BRAILLE LINE:  'Themes          >'
-#      VISIBLE:  'Themes          >', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Themes          >'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'Themes          > Basic Grey '
-#      VISIBLE:  'Themes          > Basic Gr', cursor=19
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Basic Grey '
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Basic Grey", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'The Blues'
-#      VISIBLE:  'The Blues', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'The Blues'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("The Blues", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'Garden'
-#      VISIBLE:  'Garden', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Garden'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Garden", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'In the Pink grayed'
-#      VISIBLE:  'In the Pink grayed', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'In the Pink grayed'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("In the Pink", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'Rose '
-#      VISIBLE:  'Rose ', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Rose '
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Rose", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "Move to basic grey", 
+    ["BRAILLE LINE:  'Themes ÂÂ Â ÂÂ Â>'",
+     "     VISIBLE:  'Themes ÂÂ Â ÂÂ Â>', cursor=0",
+     "BRAILLE LINE:  'Themes ÂÂ Â ÂÂ Â>'",
+     "     VISIBLE:  'Themes ÂÂ Â ÂÂ Â>', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'menu'",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Basic Grey '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to the blues", 
+    ["BRAILLE LINE:  'The Blues'",
+     "     VISIBLE:  'The Blues', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'The Blues'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to garden", 
+    ["BRAILLE LINE:  'Garden'",
+     "     VISIBLE:  'Garden', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Garden'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to in the pink", 
+    ["BRAILLE LINE:  'In the Pink grayed'",
+     "     VISIBLE:  'In the Pink grayed', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'In the Pink grayed'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to rose", 
+    ["BRAILLE LINE:  'Rose '",
+     "     VISIBLE:  'Rose ', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Rose '"]))
 
-# Note:  accessible name needed to be removed because of unicode characters
-# BRAILLE LINE:  'Themes          >'
-#      VISIBLE:  'Themes          >', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Themes          >'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Left"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "Move back to Themes", 
+    ["BRAILLE LINE:  'Themes ÂÂ Â ÂÂ Â>'",
+     "     VISIBLE:  'Themes ÂÂ Â ÂÂ Â>', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Themes ÂÂ Â ÂÂ Â>'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to hide", 
+    ["BRAILLE LINE:  'Hide'",
+     "     VISIBLE:  'Hide', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Hide'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to show", 
+    ["BRAILLE LINE:  'Show'",
+     "     VISIBLE:  'Show', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to more", 
+    ["BRAILLE LINE:  'More ÂÂ Â ÂÂ Â ÂÂ Â >'",
+     "     VISIBLE:  'More ÂÂ Â ÂÂ Â ÂÂ Â >', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'More ÂÂ Â ÂÂ Â ÂÂ Â >'"]))
 
-# BRAILLE LINE:  'Hide'
-#      VISIBLE:  'Hide', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Hide'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Hide", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'Show'
-#      VISIBLE:  'Show', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Show'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Show", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# Note:  accessible name needed to be removed because of unicode characters
-# BRAILLE LINE:  'More                >'
-#      VISIBLE:  'More                >', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'More                >'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# BRAILLE LINE:  'More                > one '
-#      VISIBLE:  'More                > o', cursor=23
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'one '
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("one", acc_role=pyatspi.ROLE_MENU_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "Move to one", 
+    ["BRAILLE LINE:  'one '",
+     "     VISIBLE:  'one ', cursor=0",
+     "BRAILLE LINE:  'one '",
+     "     VISIBLE:  'one ', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'menu'",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'one '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Move to two", 
+    ["BRAILLE LINE:  'two'",
+     "     VISIBLE:  'two', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'two'"]))
 
-# BRAILLE LINE:  'two'
-#      VISIBLE:  'two', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'two'
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("two", acc_role=pyatspi.ROLE_MENU_ITEM))
-
-# Leave the menu.  Focus moves to the first cell of the table.
-# BRAILLE LINE:  'Entry # Date Expense Amount Merchant Type ColumnHeader'
-#      VISIBLE:  'Entry # Date Expense Amount Merc', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Entry # column header'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Escape"))
+sequence.append(utils.AssertPresentationAction(
+    "leave menu", 
+    ["BRAILLE LINE:  'Entry # $l Date $l'",
+     "     VISIBLE:  'Entry # $l Date $l', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'table'"]))
 
 ########################################################################
 # End menu navigation

Modified: trunk/test/keystrokes/firefox/moz_progressbar.py
==============================================================================
--- trunk/test/keystrokes/firefox/moz_progressbar.py	(original)
+++ trunk/test/keystrokes/firefox/moz_progressbar.py	Fri Jan 11 20:28:20 2008
@@ -1,4 +1,6 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
+
 
 """Test of Mozilla ARIA progressbar presentation using Firefox.
 """
@@ -22,160 +24,135 @@
 sequence.append(TypeAction("http://www.mozilla.org/access/dhtml/progressbar";))
 sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForDocLoad())
-sequence.append(WaitForFocus("DHTML Progress Bar", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+sequence.append(WaitForFocus("ARIA Progress Bar", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Tab to the button and press it.  The following will be presented.
-# Note: unicode chars removed from between 'schedule' and 'Cancel'
-#
-#  BRAILLE LINE:  'Load schedule   Cancel'
-#       VISIBLE:  'Load schedule   Cancel', cursor=0
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Load schedule button'
+# Tab to the button and press it.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Load schedule", acc_role=pyatspi.ROLE_PUSH_BUTTON))
-
-
+sequence.append(utils.AssertPresentationAction(
+    "tab to button", 
+    ["BRAILLE LINE:  'Load schedule  Cancel'",
+     "     VISIBLE:  'Load schedule  Cancel', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Load schedule button'"]))
 
 ########################################################################
-# Push the button to start progressbar.  The following will be presented
-# on each update.
-# [[[Bug?: no Braille output]]]
+# Push the button to start progressbar.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Return"))
 
-# SPEECH OUTPUT: '5 percent. '
-sequence.append(WaitAction("object:property-change:accessible-value",
-                           None,
-                           None,
-                           pyatspi.ROLE_PROGRESS_BAR,
-                           5000))
-# SPEECH OUTPUT: '10 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '15 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '20 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '25 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '30 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '35 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '40 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '45 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '50 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '55 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '60 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '65 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '70 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '75 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '80 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '85 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '90 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '95 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
-# SPEECH OUTPUT: '100 percent. '
 sequence.append(WaitAction("object:property-change:accessible-value",
                            None,
                            None,
                            pyatspi.ROLE_PROGRESS_BAR,
                            5000))
 
-########################################################################
-# Wait for the table to pop up indicating that the task is done.  Note:
-# other events such as object:children-changed:add on document frame did
-# not work here.
-#
-sequence.append(WaitAction("object:property-change:accessible-parent",
-                           None,
-                           None,
-                           pyatspi.ROLE_TABLE,
-                           15000))
+
+sequence.append(utils.AssertPresentationAction(
+    "progress output", 
+    ["SPEECH OUTPUT: '10 percent. '",
+     "SPEECH OUTPUT: '20 percent. '",
+     "SPEECH OUTPUT: '30 percent. '",
+     "SPEECH OUTPUT: '40 percent. '",
+     "SPEECH OUTPUT: '50 percent. '",
+     "SPEECH OUTPUT: '60 percent. '",
+     "SPEECH OUTPUT: '70 percent. '",
+     "SPEECH OUTPUT: '80 percent. '",
+     "SPEECH OUTPUT: '90 percent. '",
+     "SPEECH OUTPUT: '100 percent. '"]))
 
 ########################################################################
 # Close the demo

Modified: trunk/test/keystrokes/firefox/moz_tabpanel.py
==============================================================================
--- trunk/test/keystrokes/firefox/moz_tabpanel.py	(original)
+++ trunk/test/keystrokes/firefox/moz_tabpanel.py	Fri Jan 11 20:28:20 2008
@@ -32,92 +32,94 @@
 ########################################################################
 # Tab to the tabpanel.
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab One Tab Two Tab Three Tab Fo', cursor=1
-# SPEECH OUTPUT: 'Tab One page Tab Two page Tab Three page Tab Four page Tab Five page'
-#
+# File bug for no output
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Tab One", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "tab to tabpanel", 
+    [""]))
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab One Tab Two Tab Three Tab Fo', cursor=1
-# SPEECH OUTPUT: 'section'
-# SPEECH OUTPUT: 'Tab One page'
-# SPEECH OUTPUT: 'item 1 of 1'
-# SPEECH OUTPUT: ''
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  'Tab One Page Tab Two Page'",
+     "     VISIBLE:  'Tab One Page Tab Two Page', cursor=1",
+     "SPEECH OUTPUT: 'section'",
+     "SPEECH OUTPUT: 'Tab One page'",
+     "SPEECH OUTPUT: 'item 1 of 1'",
+     "SPEECH OUTPUT: ''"]))
 
 ########################################################################
 # Move to tab 2.
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab Two Tab Three Tab Four Tab F', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab Two page'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Tab Two", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 2", 
+    ["BRAILLE LINE:  'Tab Two Page Tab Three Page'",
+     "     VISIBLE:  'Tab Two Page Tab Three Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab Two page'"]))
 ########################################################################
 # Move to tab 3
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab Three Tab Four Tab Five', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab Three page'
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Tab Three", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 3", 
+    ["BRAILLE LINE:  'Tab Three Page Tab Four Page'",
+     "     VISIBLE:  'Tab Three Page Tab Four Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab Three page'"]))
 ########################################################################
 # Move to tab 3 contents
 #
-# BRAILLE LINE:  '&=y RadioButton Internal Portal Bookmark & y RadioButton External URL '
-#      VISIBLE:  '&=y RadioButton Internal Portal ', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Internal Portal Bookmark'
-# SPEECH OUTPUT: 'selected radio button'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
-sequence.append(WaitForFocus("Internal Portal Bookmark", acc_role=pyatspi.ROLE_RADIO_BUTTON))
-
+sequence.append(utils.AssertPresentationAction(
+    "tab to tab 3 contents", 
+    ["BRAILLE LINE:  '&=y RadioButton Internal Portal Bookmark & y RadioButton External URL  '",
+     "     VISIBLE:  '&=y RadioButton Internal Portal ', cursor=1",
+     "SPEECH OUTPUT: 'Tab Three  Tab Three scroll pane'",
+     "SPEECH OUTPUT: 'Internal Portal Bookmark'",
+     "SPEECH OUTPUT: 'selected radio button'"]))
 ########################################################################
 # Move back to tab 3
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab Three Tab Four Tab Five', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab Three page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>ISO_Left_Tab"))
-sequence.append(WaitForFocus("Tab Three", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "move back to tab 3", 
+    ["BRAILLE LINE:  'Tab Three Page Tab Four Page'",
+     "     VISIBLE:  'Tab Three Page Tab Four Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab Three page'"]))
 ########################################################################
 # Move to tab 4
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab Four Tab Five', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab Four page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Tab Four", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 4", 
+    ["BRAILLE LINE:  'Tab Four Page Tab Five Page'",
+     "     VISIBLE:  'Tab Four Page Tab Five Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab Four page'"]))
 ########################################################################
 # Move to tab 5
 #
-# BRAILLE LINE:  'Tab One Tab Two Tab Three Tab Four Tab Five'
-#      VISIBLE:  'Tab Five', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Tab Five page'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
-sequence.append(WaitForFocus("Tab Five", acc_role=pyatspi.ROLE_PAGE_TAB))
-
+sequence.append(utils.AssertPresentationAction(
+    "arrow to tab 5", 
+    ["BRAILLE LINE:  'Tab Five Page'",
+     "     VISIBLE:  'Tab Five Page', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Tab Five page'"]))
 ########################################################################
 # Close the demo
 #

Modified: trunk/test/keystrokes/firefox/uiuc_tree.py
==============================================================================
--- trunk/test/keystrokes/firefox/uiuc_tree.py	(original)
+++ trunk/test/keystrokes/firefox/uiuc_tree.py	Fri Jan 11 20:28:20 2008
@@ -19,158 +19,194 @@
 #
 sequence.append(KeyComboAction("<Control>l"))
 sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
-sequence.append(TypeAction("http://test.cita.uiuc.edu/aria/tree/xhtml.php?title=Tree%20Example%201&ginc=includes/tree1a.inc&gcss=css/tree1a.css&gjs=../js/globals.js,../js/enable_app.js,js/tree1a.js";))
+sequence.append(TypeAction("http://test.cita.uiuc.edu/aria/tree/view_html.php?title=Tree%20Example%201&ginc=includes/tree1_inline.inc&gcss=css/tree1_inline.css&gjs=../js/globals.js,../js/widgets_inline.js,js/tree1_inline.js";))
 sequence.append(KeyComboAction("Return"))
 sequence.append(WaitForDocLoad())
-sequence.append(WaitForFocus("application/xhtml+xml: Tree Example 1", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+sequence.append(WaitForFocus("text/html: Tree Example 1", acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Tab to the tree.  The following is presented.
-#
-# BRAILLE LINE:  'Fruits expanded ListItem LEVEL 1'
-#      VISIBLE:  'Fruits expanded ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Fruits expanded list item level 1'
-# SPEECH OUTPUT: 'tree level 1'
+# Tab to the tree.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Tab"))
 sequence.append(WaitForFocus("Fruits", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "tab to tree", 
+    ["BRAILLE LINE:  'Fruits ListItem'",
+     "     VISIBLE:  'Fruits ListItem', cursor=1",
+     "BRAILLE LINE:  'Fruits ListItem'",
+     "     VISIBLE:  'Fruits ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Foods tree'",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Fruits list item expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
 ########################################################################
-# Do a basic "Where Am I" via KP_Enter.  The following should be
-# presented in speech and braille:
-#
-# BRAILLE LINE:  'Fruits expanded ListItem LEVEL 1'
-#      VISIBLE:  'Fruits expanded ListItem LEVEL 1', cursor=1
-# SPEECH OUTPUT: 'Fruits'
-# SPEECH OUTPUT: 'list item'
+# Do a basic "Where Am I" via KP_Enter.  
 #
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("KP_Enter"))
 sequence.append(PauseAction(3000))
+sequence.append(utils.AssertPresentationAction(
+    "basic whereAmI", 
+    ["BRAILLE LINE:  'Fruits ListItem'",
+     "     VISIBLE:  'Fruits ListItem', cursor=1",
+     "SPEECH OUTPUT: 'list item'",
+     "SPEECH OUTPUT: 'Fruits'",
+     "SPEECH OUTPUT: 'item 1 of 2'",
+     "SPEECH OUTPUT: 'expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
 ########################################################################
 # Navigate the tree using the arrows.  
 #
-# BRAILLE LINE:  'Oranges ListItem LEVEL 2'
-#      VISIBLE:  'Oranges ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Oranges list item level 2'
-# SPEECH OUTPUT: 'tree level 2'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Oranges", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Pineapples ListItem LEVEL 2'
-#      VISIBLE:  'Pineapples ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Pineapples list item level 2'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Pineapples", acc_role=pyatspi.ROLE_LIST_ITEM))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to oranges", 
+    ["BRAILLE LINE:  'Oranges ListItem'",
+     "     VISIBLE:  'Oranges ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Oranges list item'",
+     "SPEECH OUTPUT: 'tree level 2'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to pineapples", 
+    ["BRAILLE LINE:  'Pineapples ListItem'",
+     "     VISIBLE:  'Pineapples ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Pineapples list item'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to apples", 
+    ["BRAILLE LINE:  'Apples ListItem'",
+     "     VISIBLE:  'Apples ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Apples list item collapsed'"]))
 
-# BRAILLE LINE:  'Apples collapsed ListItem LEVEL 2'
-#      VISIBLE:  'Apples collapsed ListItem LEVEL ', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Apples collapsed list item level 2'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Apples", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Apples expanded ListItem LEVEL 2'
-#      VISIBLE:  'Apples expanded ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: 'expanded'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "expand apples", 
+    ["BRAILLE LINE:  'Apples ListItem'",
+     "     VISIBLE:  'Apples ListItem', cursor=1",
+     "SPEECH OUTPUT: 'expanded'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to macintosh", 
+    ["BRAILLE LINE:  'Macintosh ListItem'",
+     "     VISIBLE:  'Macintosh ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Macintosh list item'",
+     "SPEECH OUTPUT: 'tree level 3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to granny smith", 
+    ["BRAILLE LINE:  'Granny Smith ListItem'",
+     "     VISIBLE:  'Granny Smith ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Granny Smith list item collapsed'"]))
 
-# BRAILLE LINE:  'Macintosh ListItem LEVEL 3'
-#      VISIBLE:  'Macintosh ListItem LEVEL 3', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Macintosh list item level 3'
-# SPEECH OUTPUT: 'tree level 3'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Macintosh", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Granny Smith collapsed ListItem LEVEL 3'
-#      VISIBLE:  'Granny Smith collapsed ListItem ', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Granny Smith collapsed list item level 3'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Granny Smith", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Granny Smith expanded ListItem LEVEL 3'
-#      VISIBLE:  'Granny Smith expanded ListItem L', cursor=1
-# SPEECH OUTPUT: 'expanded'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "expand granny smith", 
+    ["BRAILLE LINE:  'Granny Smith ListItem'",
+     "     VISIBLE:  'Granny Smith ListItem', cursor=1",
+     "SPEECH OUTPUT: 'expanded'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to washington state", 
+    ["BRAILLE LINE:  'Washington State ListItem'",
+     "     VISIBLE:  'Washington State ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Washington State list item'",
+     "SPEECH OUTPUT: 'tree level 4'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to michigan", 
+    ["BRAILLE LINE:  'Michigan ListItem'",
+     "     VISIBLE:  'Michigan ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Michigan list item'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to new york", 
+    ["BRAILLE LINE:  'New York ListItem'",
+     "     VISIBLE:  'New York ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'New York list item'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to fuji", 
+    ["BRAILLE LINE:  'Fuji ListItem'",
+     "     VISIBLE:  'Fuji ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Fuji list item'",
+     "SPEECH OUTPUT: 'tree level 3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to bananas", 
+    ["BRAILLE LINE:  'Bananas ListItem'",
+     "     VISIBLE:  'Bananas ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Bananas list item'",
+     "SPEECH OUTPUT: 'tree level 2'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to pears", 
+    ["BRAILLE LINE:  'Pears ListItem'",
+     "     VISIBLE:  'Pears ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Pears list item'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "arrow to vegetables", 
+    ["BRAILLE LINE:  'Vegetables ListItem'",
+     "     VISIBLE:  'Vegetables ListItem', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Vegetables list item expanded'",
+     "SPEECH OUTPUT: 'tree level 1'"]))
 
-# BRAILLE LINE:  'Washington State ListItem LEVEL 4'
-#      VISIBLE:  'Washington State ListItem LEVEL ', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Washington State list item level 4'
-# SPEECH OUTPUT: 'tree level 4'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Washington State", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Michigan ListItem LEVEL 4'
-#      VISIBLE:  'Michigan ListItem LEVEL 4', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Michigan list item level 4'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Michigan", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'New York ListItem LEVEL 4'
-#      VISIBLE:  'New York ListItem LEVEL 4', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'New York list item level 4'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("New York", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Fuji ListItem LEVEL 3'
-#      VISIBLE:  'Fuji ListItem LEVEL 3', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Fuji list item level 3'
-# SPEECH OUTPUT: 'tree level 3'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Fuji", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Bananas ListItem LEVEL 2'
-#      VISIBLE:  'Bananas ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Bananas list item level 2'
-# SPEECH OUTPUT: 'tree level 2'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Bananas", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Pears ListItem LEVEL 2'
-#      VISIBLE:  'Pears ListItem LEVEL 2', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Pears list item level 2'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Pears", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Vegetables expanded ListItem LEVEL 1'
-#      VISIBLE:  'Vegetables expanded ListItem LEV', cursor=1
-# SPEECH OUTPUT: ''
-# SPEECH OUTPUT: 'Vegetables expanded list item level 1'
-# SPEECH OUTPUT: 'tree level 1'
-#
-sequence.append(KeyComboAction("Down"))
-sequence.append(WaitForFocus("Vegetables", acc_role=pyatspi.ROLE_LIST_ITEM))
-
-# BRAILLE LINE:  'Vegetables collapsed ListItem LEVEL 1'
-#      VISIBLE:  'Vegetables collapsed ListItem LE', cursor=1
-#SPEECH OUTPUT: 'collapsed'
-#
+sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Left"))
+sequence.append(utils.AssertPresentationAction(
+    "collapse vegetables", 
+    ["BRAILLE LINE:  'Vegetables ListItem'",
+     "     VISIBLE:  'Vegetables ListItem', cursor=1",
+     "SPEECH OUTPUT: 'collapsed'"]))
 
+########################################################################
+# Close the demo
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus(acc_name="Location", acc_role=pyatspi.ROLE_ENTRY))
+sequence.append(TypeAction("about:blank"))
+sequence.append(KeyComboAction("Return"))
+sequence.append(WaitForDocLoad())
 # Just a little extra wait to let some events get through.
 #
 sequence.append(PauseAction(3000))



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