orca r4228 - in trunk: . src/orca/scripts/toolkits/Gecko test/keystrokes/firefox



Author: joanied
Date: Mon Sep 15 19:54:39 2008
New Revision: 4228
URL: http://svn.gnome.org/viewvc/orca?rev=4228&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/script.py:
  test/keystrokes/firefox/label_guess_bug_509809.py: (new)
  test/keystrokes/firefox/label_guess_bug_546815.py: (new)
  test/keystrokes/firefox/label_guess_bugzilla_search.py:
  test/keystrokes/firefox/label_guess_entries.py:
  test/keystrokes/firefox/html_role_combo_box.py:
  test/keystrokes/firefox/sayAll_imagemap.py:
  test/keystrokes/firefox/dojo_slider.py:
  test/keystrokes/firefox/uiuc_grid.py:
  test/keystrokes/firefox/uiuc_slider.py:        
  Fix for bug #546815 - guessLabelFromLine() is guessing text that
  is on other lines in FF3. Plus a couple of tests I forgot to
  update.



Added:
   trunk/test/keystrokes/firefox/label_guess_bug_509809.py
   trunk/test/keystrokes/firefox/label_guess_bug_546815.py
Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/script.py
   trunk/test/keystrokes/firefox/dojo_slider.py
   trunk/test/keystrokes/firefox/html_role_combo_box.py
   trunk/test/keystrokes/firefox/label_guess_bugzilla_search.py
   trunk/test/keystrokes/firefox/label_guess_entries.py
   trunk/test/keystrokes/firefox/sayAll_imagemap.py
   trunk/test/keystrokes/firefox/uiuc_grid.py
   trunk/test/keystrokes/firefox/uiuc_slider.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/script.py	Mon Sep 15 19:54:39 2008
@@ -1922,7 +1922,8 @@
             #
             if candidate.getRole() in [pyatspi.ROLE_LIST,
                                        pyatspi.ROLE_COMBO_BOX] \
-               and candidate.getState().contains(pyatspi.STATE_FOCUSABLE):
+               and candidate.getState().contains(pyatspi.STATE_FOCUSABLE) \
+               and not self.isSameObject(obj, candidate):
                 start = self.getCharacterOffsetInParent(candidate)
                 end = start + 1
                 candidate = candidate.parent
@@ -3703,29 +3704,29 @@
         #
         # Reverse this order for radio buttons and check boxes
         #
-        guess = None
-        extents = obj.queryComponent().getExtents(0)
-        objExtents = [extents.x, extents.y, extents.width, extents.height]
-
         lineContents = self.currentLineContents
         ourIndex = self.findObjectOnLine(obj, 0, lineContents)
         if ourIndex < 0:
             lineContents = self.getLineContentsAtOffset(obj, 0)
             ourIndex = self.findObjectOnLine(obj, 0, lineContents)
 
-        objectsOnLine = []
-        for content in lineContents:
-            objectsOnLine.append(content[0])
-
-        # Now that we know where we are, let's see who are neighbors are
-        # and where they are.
-        #
-        onLeft = None
-        onRight = None
-        if ourIndex > 0:
-            onLeft = objectsOnLine[ourIndex - 1]
-        if 0 <= ourIndex < len(objectsOnLine) - 1:
-            onRight = objectsOnLine[ourIndex + 1]
+        thisObj = lineContents[ourIndex]
+        objExtents = self.getExtents(thisObj[0], thisObj[1], thisObj[2])
+
+        leftGuess = ""
+        extents = objExtents
+        for i in range (ourIndex - 1, -1, -1):
+            candidate, start, end, string = lineContents[i]
+            if self.isFormField(candidate):
+                break
+
+            prevExtents = self.getExtents(candidate, start, end)
+            if -1 <= extents[0] - (prevExtents[0] + prevExtents[2]) < 75:
+                # The candidate might be an image with alternative text.
+                #
+                string = string or candidate.name
+                leftGuess = string + leftGuess
+                extents = prevExtents
 
         # Normally we prefer what's on the left given a choice.  Reasons
         # to prefer what's on the right include looking at a radio button
@@ -3735,105 +3736,38 @@
         preferRight = obj.getRole() in [pyatspi.ROLE_CHECK_BOX,
                                         pyatspi.ROLE_RADIO_BUTTON]
 
-        # [[[TODO: JD: Nearby text that's not actually in the form may need
-        # to be ignored.  Let's try that for now and adjust based on feedback
-        # and testing.]]]
-        #
-        leftIsInForm = (onLeft and onLeft.getRole() == pyatspi.ROLE_FORM)
-        if not leftIsInForm:
-            leftIsInForm = self.getAncestor(onLeft,
-                                            [pyatspi.ROLE_FORM],
-                                            [pyatspi.ROLE_DOCUMENT_FRAME])
-        rightIsInForm = (onRight and onRight.getRole() == pyatspi.ROLE_FORM)
-        if not rightIsInForm:
-            rightIsInForm = self.getAncestor(onRight,
-                                             [pyatspi.ROLE_FORM],
-                                             [pyatspi.ROLE_DOCUMENT_FRAME])
-        # If it's a radio button, we'll waive the requirement of the text
-        # on the right being within the form (or rather, we'll just act as
-        # if it were even if it's not).
-        #
-        if obj.getRole() == pyatspi.ROLE_RADIO_BUTTON:
-            rightIsInForm = True
-
-        # [[[TODO: Grayed out buttons don't pass the isFormField() test
-        # because they are neither focusable nor showing -- and thus
-        # something we don't want to navigate to via structural navigation.
-        # We may need to rethink our definition of isFormField().  In the
-        # meantime, let's not used grayed out buttons as labels. As an
-        # example, see the Search entry on live.gnome.org.]]]
-        #
-        if onLeft:
-            leftIsFormField = self.isFormField(onLeft) \
-                              or onLeft.getRole() == pyatspi.ROLE_PUSH_BUTTON
-        if onRight:
-            rightIsFormField = self.isFormField(onRight) \
-                               or onRight.getRole() == pyatspi.ROLE_PUSH_BUTTON
-
-        if onLeft and leftIsInForm and not leftIsFormField:
-            # We want to get the text on the left including embedded objects
-            # that are NOT form fields. If we find a form field on the left,
-            # that will be the starting point of the text we want.
-            #
-            startOffset = 0
-            endOffset = -1
-            if self.isSameObject(obj.parent, onLeft):
-                endOffset = self.getCharacterOffsetInParent(obj)
-                index = obj.getIndexInParent()
-                if index > 0:
-                    prevSibling = onLeft[index - 1]
-                    if self.isFormField(prevSibling):
-                        startOffset = \
-                                  self.getCharacterOffsetInParent(prevSibling)
-
-            guess = self.expandEOCs(onLeft, startOffset, endOffset)
-            if guess:
-                guess = guess.decode("UTF-8").strip()
-            if not guess and onLeft.getRole() == pyatspi.ROLE_IMAGE:
-                guess = onLeft.name
+        # Sometimes we don't want the text on the right -- at least not
+        # until we are able to present labels on the right after the
+        # object we believe they are labeling, rather than before.
+        #
+        preventRight = obj.getRole() == pyatspi.ROLE_COMBO_BOX
+
+        rightGuess = ""
+        extents = objExtents
+        if not preventRight and (preferRight or not leftGuess):
+            for i in range (ourIndex + 1, len(lineContents)):
+                candidate, start, end, string = lineContents[i]
+                # If we're looking on the right and find text, and then
+                # find another nearby form field, the text we've found
+                # might be the label for that field rather than for this
+                # one. We'll assume that for now and bail under these
+                # conditions.
+                #
+                if self.isFormField(candidate):
+                    if not preferRight:
+                        rightGuess = ""
+                    break
 
-        if (preferRight or not guess) \
-           and onRight and rightIsInForm and not rightIsFormField:
-            # The object's horizontal position plus its width tells us
-            # where the text on the right can begin.  For now, define
-            # "immediately after" as  within 50 pixels.
-            #
-            canStartAt = objExtents[0] + objExtents[2]
-            onRightExtents = onRight.queryComponent().getExtents(0)
-            onRightExtents = [onRightExtents.x, onRightExtents.y,
-                              onRightExtents.width, onRightExtents.height]
-
-            if (onRightExtents[0] - canStartAt) <= 50:
-                # We want to get the text on the right including embedded
-                # objects that are NOT form fields.  If we find a form field
-                # on the right, that will be the ending point of the text we
-                # want.  However, if we have a form field on the right and
-                # do not have a reason to prefer the text on the right, our
-                # label may be on the line above.  As an example, see the
-                # bugzilla Advanced search... Bug Changes section.
-                #
-                startOffset = 0
-                endOffset = -1
-                if self.isSameObject(obj.parent, onRight):
-                    startOffset = self.getCharacterOffsetInParent(obj)
-                    index = obj.getIndexInParent()
-                    if index < onRight.childCount - 1:
-                        nextSibling = onRight[index + 1]
-                        nextRole = nextSibling.getRole()
-                        if self.isFormField(nextSibling) \
-                           or nextRole == pyatspi.ROLE_RADIO_BUTTON:
-                            endOffset = \
-                                  self.getCharacterOffsetInParent(nextSibling)
-                            if not preferRight:
-                                return None
-
-                guess = self.expandEOCs(onRight, startOffset, endOffset)
-                if guess:
-                    guess = guess.decode("UTF-8").strip()
-                if not guess and onRight.getRole() == pyatspi.ROLE_IMAGE:
-                    guess = onRight.name
+                nextExtents = self.getExtents(candidate, start, end)
+                if -1 <= nextExtents[0] - (extents[0] + extents[2]) < 75:
+                    # The candidate might be an image with alternative text.
+                    #
+                    string = string or candidate.name
+                    rightGuess += string
+                    extents = nextExtents
 
-        return guess
+        guess = rightGuess or leftGuess
+        return guess.strip()
 
     def guessLabelFromOtherLines(self, obj):
         """Attempts to guess what the label of an unlabeled form control
@@ -4192,7 +4126,7 @@
             # cell.
             #
             guess = self.guessLabelFromOtherLines(obj)
-            #print "guess form other lines: ", guess
+            #print "guess from other lines: ", guess
         if not guess:
             # We've pretty much run out of options.  From Tom's overview
             # of the approach for all controls:

Modified: trunk/test/keystrokes/firefox/dojo_slider.py
==============================================================================
--- trunk/test/keystrokes/firefox/dojo_slider.py	(original)
+++ trunk/test/keystrokes/firefox/dojo_slider.py	Mon Sep 15 19:54:39 2008
@@ -199,14 +199,12 @@
 sequence.append(PauseAction(1000))
 sequence.append(utils.AssertPresentationAction(
     "move to entry", 
-    ["BUG? - We're guessing other text in addition to the label",
-     "BRAILLE LINE:  'Slider1 Value: 10.0% $l'",
-     "     VISIBLE:  'Slider1 Value: 10.0% $l', cursor=21",
-     "BRAILLE LINE:  'Slider1 Value: 10.0% $l'",
-     "     VISIBLE:  'Slider1 Value: 10.0% $l', cursor=21",
+    ["BRAILLE LINE:  '10.0% $l'",
+     "     VISIBLE:  '10.0% $l', cursor=6",
+     "BRAILLE LINE:  '10.0% $l'",
+     "     VISIBLE:  '10.0% $l', cursor=6",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'initial value=10, min=0, max=100, pageIncrement=100, onChange event triggers input box value change immediately",
-     "Horizontal Slider Example Slider1 Value: read only text 10.0%'"]))
+     "SPEECH OUTPUT: 'Slider1 Value: read only text 10.0%'"]))
 
 ########################################################################
 # Tab to the button between the sliders.  

Modified: trunk/test/keystrokes/firefox/html_role_combo_box.py
==============================================================================
--- trunk/test/keystrokes/firefox/html_role_combo_box.py	(original)
+++ trunk/test/keystrokes/firefox/html_role_combo_box.py	Mon Sep 15 19:54:39 2008
@@ -86,7 +86,7 @@
     ["BRAILLE LINE:  'Priority Link : Normal Combo'",
      "     VISIBLE:  'Priority Link : Normal Combo', cursor=17",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Normal combo box'"]))
+     "SPEECH OUTPUT: 'Priority: Normal combo box'"]))
 
 ########################################################################
 # Press Down Arrow to change the selection to Low.  
@@ -150,7 +150,7 @@
     ["BRAILLE LINE:  'Priority Link : Low Combo'",
      "     VISIBLE:  'Priority Link : Low Combo', cursor=17",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Low combo box'"]))
+     "SPEECH OUTPUT: 'Priority: Low combo box'"]))
 
 ########################################################################
 # Press Tab once to get to the Resolution combo box.

Added: trunk/test/keystrokes/firefox/label_guess_bug_509809.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/label_guess_bug_509809.py	Mon Sep 15 19:54:39 2008
@@ -0,0 +1,203 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of label guess functionality, primarily by line."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+########################################################################
+# We wait for the focus to be on a blank Firefox window.
+#
+sequence.append(WaitForWindowActivate("Minefield",None))
+
+########################################################################
+# Load the test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "dev-accessibility.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Mozilla Link h1'",
+     "     VISIBLE:  'Mozilla Link h1', cursor=1",
+     "SPEECH OUTPUT: 'Mozilla link heading level 1'"]))
+
+########################################################################
+# Press Insert+Tab to move from form field to form field.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'search mozilla: search mozilla:  $l Go Button'",
+     "     VISIBLE:  'search mozilla:  $l Go Button', cursor=17",
+     "SPEECH OUTPUT: 'search mozilla: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'search mozilla: search mozilla:  $l Go Button'",
+     "     VISIBLE:  'Go Button', cursor=1",
+     "SPEECH OUTPUT: 'Go button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Your email address:  $l'",
+     "     VISIBLE:  'Your email address:  $l', cursor=21",
+     "SPEECH OUTPUT: 'Your email address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Your name (optional):  $l'",
+     "     VISIBLE:  'Your name (optional):  $l', cursor=23",
+     "SPEECH OUTPUT: 'Your name (optional): text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Pick a password:  $l'",
+     "     VISIBLE:  'Pick a password:  $l', cursor=18",
+     "SPEECH OUTPUT: 'Pick a password: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Reenter password to confirm:  $l'",
+     "     VISIBLE:  'Reenter password to confirm:  $l', cursor=30",
+     "SPEECH OUTPUT: 'Reenter password to confirm: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'a daily digest? &=y RadioButton No & y RadioButton  Yes'",
+     "     VISIBLE:  '&=y RadioButton No & y RadioButt', cursor=1",
+     "SPEECH OUTPUT: 'No selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'a daily digest? &=y RadioButton  No  Yes & y RadioButton Yes'",
+     "     VISIBLE:  '& y RadioButton Yes', cursor=1",
+     "SPEECH OUTPUT: 'Yes not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Subscribe Button'",
+     "     VISIBLE:  'Subscribe Button', cursor=1",
+     "SPEECH OUTPUT: 'Subscribe button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  ' $l Password:  $l Visit Subscrib', cursor=1",
+     "SPEECH OUTPUT: 'Admin address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  ' $l Visit Subscriber List Button', cursor=1",
+     "SPEECH OUTPUT: 'Password: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  'Visit Subscriber List Button', cursor=1",
+     "SPEECH OUTPUT: 'Visit Subscriber List button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  ' $l Unsubscribe or edit options Button'",
+     "     VISIBLE:  ' $l Unsubscribe or edit options ', cursor=1",
+     "SPEECH OUTPUT: 'text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  ' $l Unsubscribe or edit options Button'",
+     "     VISIBLE:  'Unsubscribe or edit options Butt', cursor=1",
+     "SPEECH OUTPUT: 'Unsubscribe or edit options button'"]))
+
+########################################################################
+# Move to the location bar by pressing Control+L.  When it has focus
+# type "about:blank" and press Return to restore the browser to the
+# conditions at the test's start.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("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))
+
+sequence.append(utils.AssertionSummaryAction())
+
+sequence.start()

Added: trunk/test/keystrokes/firefox/label_guess_bug_546815.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/label_guess_bug_546815.py	Mon Sep 15 19:54:39 2008
@@ -0,0 +1,224 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of label guess functionality, primarily by line."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+########################################################################
+# We wait for the focus to be on a blank Firefox window.
+#
+sequence.append(WaitForWindowActivate("Minefield",None))
+
+########################################################################
+# Load the test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "bug-546815.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Separator'",
+     "     VISIBLE:  'Separator', cursor=1",
+     "SPEECH OUTPUT: 'separator'"]))
+
+########################################################################
+# Press Insert+Tab to move from form field to form field.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Enter your Name:  $l text field using default type=text'",
+     "     VISIBLE:  ' $l text field using default typ', cursor=1",
+     "SPEECH OUTPUT: 'Enter your Name: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '1. Enter your Address:  $l text field using SIZE and MAXLENGTH'",
+     "     VISIBLE:  ' $l text field using SIZE and MA', cursor=1",
+     "SPEECH OUTPUT: '1. Enter your Address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  ' $l 3. Enter your State:  $l 4. ', cursor=1",
+     "SPEECH OUTPUT: '2. Enter your City: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  ' $l 4. Enter your Country: US $l', cursor=1",
+     "SPEECH OUTPUT: '3. Enter your State: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  'US $l text field using value', cursor=1",
+     "SPEECH OUTPUT: '4. Enter your Country: text US'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '5. Enter your Zip:  $l'",
+     "     VISIBLE:  '5. Enter your Zip:  $l', cursor=20",
+     "SPEECH OUTPUT: '5. Enter your Zip: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  '6. What happens when a fixed-width font(the default) is used for a one-byte text input area, let's try it.. Enter one character:  $l'",
+     "     VISIBLE:  ' $l', cursor=1",
+     "SPEECH OUTPUT: '6. What happens when a fixed-width font(the default) is used for a one-byte text input area, let's try it.. Enter one character: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox bird'",
+     "     VISIBLE:  '< > CheckBox bird', cursor=1",
+     "SPEECH OUTPUT: 'bird check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox fish'",
+     "     VISIBLE:  '< > CheckBox fish', cursor=1",
+     "SPEECH OUTPUT: 'fish check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox wild animal'",
+     "     VISIBLE:  '< > CheckBox wild animal', cursor=1",
+     "SPEECH OUTPUT: 'wild animal check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '&=y RadioButton cabernet sauvignon'",
+     "     VISIBLE:  '&=y RadioButton cabernet sauvign', cursor=1",
+     "SPEECH OUTPUT: 'cabernet sauvignon selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton merlot'",
+     "     VISIBLE:  '& y RadioButton merlot', cursor=1",
+     "SPEECH OUTPUT: 'merlot not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton nebbiolo'",
+     "     VISIBLE:  '& y RadioButton nebbiolo', cursor=1",
+     "SPEECH OUTPUT: 'nebbiolo not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton pinot noir'",
+     "     VISIBLE:  '& y RadioButton pinot noir', cursor=1",
+     "SPEECH OUTPUT: 'pinot noir not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton don't drink wine'",
+     "     VISIBLE:  '& y RadioButton don't drink wine', cursor=1",
+     "SPEECH OUTPUT: 'don't drink wine not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Enter your Name:  $l text field using default type=text'",
+     "     VISIBLE:  ' $l text field using default typ', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to top.'",
+     "SPEECH OUTPUT: 'Enter your Name: text'"]))
+
+########################################################################
+# Move to the location bar by pressing Control+L.  When it has focus
+# type "about:blank" and press Return to restore the browser to the
+# conditions at the test's start.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("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))
+
+sequence.append(utils.AssertionSummaryAction())
+
+sequence.start()

Modified: trunk/test/keystrokes/firefox/label_guess_bugzilla_search.py
==============================================================================
--- trunk/test/keystrokes/firefox/label_guess_bugzilla_search.py	(original)
+++ trunk/test/keystrokes/firefox/label_guess_bugzilla_search.py	Mon Sep 15 19:54:39 2008
@@ -494,7 +494,7 @@
     ["BRAILLE LINE:  'Sort results by: Reuse same sort as last time Combo'",
      "     VISIBLE:  'Reuse same sort as last time Com', cursor=1",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Reuse same sort as last time combo box'"]))
+     "SPEECH OUTPUT: 'Sort results by: Reuse same sort as last time combo box'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyPressAction(0, None, "KP_Insert"))

Modified: trunk/test/keystrokes/firefox/label_guess_entries.py
==============================================================================
--- trunk/test/keystrokes/firefox/label_guess_entries.py	(original)
+++ trunk/test/keystrokes/firefox/label_guess_entries.py	Mon Sep 15 19:54:39 2008
@@ -122,7 +122,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'First Name text'"]))
 
@@ -132,7 +133,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'M.I. text'"]))
 
@@ -142,7 +144,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'Last Name text'"]))
 

Modified: trunk/test/keystrokes/firefox/sayAll_imagemap.py
==============================================================================
--- trunk/test/keystrokes/firefox/sayAll_imagemap.py	(original)
+++ trunk/test/keystrokes/firefox/sayAll_imagemap.py	Mon Sep 15 19:54:39 2008
@@ -72,7 +72,10 @@
      "SPEECH OUTPUT: 'c link'",
      "SPEECH OUTPUT: 'b link'",
      "SPEECH OUTPUT: 'a link'",
-     "SPEECH OUTPUT: 'Here is some text.'"]))
+     "SPEECH OUTPUT: 'Here is some text.'",
+     "SPEECH OUTPUT: 'Safeway had some interesting (and problematic) image maps. I didn't steal the images, but if you tab and look at the status bar, you should be able to see the URI for each region. We should also be speaking and brailling it correctly now -- at least as best as we can given what they gave us.'",
+     "SPEECH OUTPUT: 'wk09_frozenmovie link image'",
+     "SPEECH OUTPUT: 'www.vons.com link www.dominicks.com link www.randalls.com link www.tomthumb.com link www.genuardis.com link www.pavilions.com link www.carrsqc.com link'"]))
 
 ########################################################################
 # Move to the location bar by pressing Control+L.  When it has focus

Modified: trunk/test/keystrokes/firefox/uiuc_grid.py
==============================================================================
--- trunk/test/keystrokes/firefox/uiuc_grid.py	(original)
+++ trunk/test/keystrokes/firefox/uiuc_grid.py	Mon Sep 15 19:54:39 2008
@@ -32,8 +32,8 @@
 sequence.append(KeyComboAction("Tab"))
 sequence.append(utils.AssertPresentationAction(
     "Tab to grid", 
-    ["BRAILLE LINE:  'Sel $l'",
-     "     VISIBLE:  'Sel $l', cursor=0",
+    ["BRAILLE LINE:  'E-mail List Sorted by Date Caption'",
+     "     VISIBLE:  'E-mail List Sorted by Date Capti', cursor=0",
      "BRAILLE LINE:  '< > Email 0 Selected CheckBox 1 Cell Read message Image Attachment Image Lowest priority Image John Smith Cell Trip to Florida Cell 2007-10-03 Cell 2K Cell'",
      "     VISIBLE:  '< > Email 0 Selected CheckBox 1 ', cursor=1",
      "SPEECH OUTPUT: ''",

Modified: trunk/test/keystrokes/firefox/uiuc_slider.py
==============================================================================
--- trunk/test/keystrokes/firefox/uiuc_slider.py	(original)
+++ trunk/test/keystrokes/firefox/uiuc_slider.py	Mon Sep 15 19:54:39 2008
@@ -63,6 +63,8 @@
      "     VISIBLE:  'Slider Control 1 51 Slider', cursor=1",
      "BRAILLE LINE:  'Slider Control 1 51 Slider'",
      "     VISIBLE:  'Slider Control 1 51 Slider', cursor=1",
+     "BRAILLE LINE:  'Slider Control 1 51 Slider'",
+     "     VISIBLE:  'Slider Control 1 51 Slider', cursor=1",
      "SPEECH OUTPUT: '51'"]))
     
 sequence.append(utils.StartRecordingAction())
@@ -114,22 +116,24 @@
      "SPEECH OUTPUT: 'Slider Control 2 slider 100'"]))
     
 ########################################################################
-# Decrement slider 2 several times
+# Increment slider 2 several times
 #
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
-    "1 Decrement slider 2", 
+    "1 Increment slider 2", 
     ["BRAILLE LINE:  'Slider Control 2 101 Slider'",
      "     VISIBLE:  'Slider Control 2 101 Slider', cursor=1",
      "BRAILLE LINE:  'Slider Control 2 101 Slider'",
      "     VISIBLE:  'Slider Control 2 101 Slider', cursor=1",
+     "BRAILLE LINE:  'Slider Control 2 101 Slider'",
+     "     VISIBLE:  'Slider Control 2 101 Slider', cursor=1",
      "SPEECH OUTPUT: '101'"]))
     
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
-    "2 Decrement slider 2", 
+    "2 Increment slider 2", 
     ["BRAILLE LINE:  'Slider Control 2 102 Slider'",
      "     VISIBLE:  'Slider Control 2 102 Slider', cursor=1",
      "BRAILLE LINE:  'Slider Control 2 102 Slider'",
@@ -141,7 +145,7 @@
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
-    "3 Decrement slider 2", 
+    "3 Increment slider 2", 
     ["BRAILLE LINE:  'Slider Control 2 103 Slider'",
      "     VISIBLE:  'Slider Control 2 103 Slider', cursor=1",
      "BRAILLE LINE:  'Slider Control 2 103 Slider'",
@@ -153,7 +157,7 @@
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Right"))
 sequence.append(utils.AssertPresentationAction(
-    "4 Decrement slider 2", 
+    "4 Increment slider 2", 
     ["BRAILLE LINE:  'Slider Control 2 104 Slider'",
      "     VISIBLE:  'Slider Control 2 104 Slider', cursor=1",
      "BRAILLE LINE:  'Slider Control 2 104 Slider'",



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