orca r3668 - in branches/gnome-2-22: . src/orca test/keystrokes/firefox



Author: joanied
Date: Sat Mar  1 21:55:35 2008
New Revision: 3668
URL: http://svn.gnome.org/viewvc/orca?rev=3668&view=rev

Log:
* src/orca/Gecko.py:
  test/keystrokes/firefox/label_guess_bugzilla_search.py:
  test/keystrokes/firefox/line_nav_bugzilla_search.py:
  Fix for bug #515804 - Whitespace needs to be removed from
  speech and braille contexts in FF3.


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/orca/Gecko.py
   branches/gnome-2-22/test/keystrokes/firefox/label_guess_bugzilla_search.py
   branches/gnome-2-22/test/keystrokes/firefox/line_nav_bugzilla_search.py

Modified: branches/gnome-2-22/src/orca/Gecko.py
==============================================================================
--- branches/gnome-2-22/src/orca/Gecko.py	(original)
+++ branches/gnome-2-22/src/orca/Gecko.py	Sat Mar  1 21:55:35 2008
@@ -3538,6 +3538,26 @@
 
         return True
 
+    def getDisplayedText(self, obj):
+        """Returns the text being displayed for an object.
+
+        Arguments:
+        - obj: the object
+
+        Returns the text being displayed for an object or None if there isn't
+        any text being shown.  Overridden in this script because we have lots
+        of whitespace we need to remove.
+        """
+
+        displayedText = default.Script.getDisplayedText(self, obj)
+        if displayedText \
+           and not (obj.getState().contains(pyatspi.STATE_EDITABLE) \
+                    or obj.getRole() in [pyatspi.ROLE_ENTRY, 
+                                         pyatspi.ROLE_PASSWORD_TEXT]):
+            displayedText = displayedText.strip()
+
+        return displayedText
+
     def getDisplayedLabel(self, obj):
         """If there is an object labelling the given object, return the
         text being displayed for the object labelling this object.

Modified: branches/gnome-2-22/test/keystrokes/firefox/label_guess_bugzilla_search.py
==============================================================================
--- branches/gnome-2-22/test/keystrokes/firefox/label_guess_bugzilla_search.py	(original)
+++ branches/gnome-2-22/test/keystrokes/firefox/label_guess_bugzilla_search.py	Sat Mar  1 21:55:35 2008
@@ -84,7 +84,7 @@
     ["BRAILLE LINE:  'Admin List'",
      "     VISIBLE:  'Admin List', cursor=1",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Classification: Admin  multi-select List with 8 items'"]))
+     "SPEECH OUTPUT: 'Classification: Admin multi-select List with 8 items'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyPressAction(0, None, "KP_Insert"))

Modified: branches/gnome-2-22/test/keystrokes/firefox/line_nav_bugzilla_search.py
==============================================================================
--- branches/gnome-2-22/test/keystrokes/firefox/line_nav_bugzilla_search.py	(original)
+++ branches/gnome-2-22/test/keystrokes/firefox/line_nav_bugzilla_search.py	Sat Mar  1 21:55:35 2008
@@ -47,9 +47,9 @@
 sequence.append(KeyComboAction("Down"))
 sequence.append(utils.AssertPresentationAction(
     "Line Down",
-    ["BRAILLE LINE:  'New bug Link  Â Browse Link  Â Search Link  Â Reports Link  Â Account Link  Â Admin Link  Â Help Link Logged In joanmarie diggs gmail com | Log Out Link'",
-     "     VISIBLE:  'New bug Link  Â Browse Link  Â', cursor=1",
-     "SPEECH OUTPUT: 'New bug link  Â Browse link  Â Search link  Â Reports link  Â Account link  Â Admin link  Â Help link Logged In joanmarie diggs gmail com | Log Out link'"]))
+    ["BRAILLE LINE:  'New bug Link  Browse Link   Search Link   Reports Link   Account Link   Admin Link   Help Link Logged In joanmarie diggs gmail com | Log Out Link'",
+     "     VISIBLE:  'New bug Link  Browse Link  Â', cursor=1",
+     "SPEECH OUTPUT: 'New bug link  Browse link   Search link   Reports link   Account link   Admin link   Help link Logged In joanmarie diggs gmail com | Log Out link'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("Down"))



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