orca r4328 - in branches/gnome-2-24: . src/orca src/orca/scripts/toolkits/Gecko test/keystrokes/firefox



Author: joanied
Date: Sat Nov  8 18:47:31 2008
New Revision: 4328
URL: http://svn.gnome.org/viewvc/orca?rev=4328&view=rev

Log:
* src/orca/structural_navigation.py:
  src/orca/scripts/toolkits/Gecko/script.py:
  test/keystrokes/firefox/html_struct_nav_bug_554616.py: (new)
  Fix for bug #554616 - Problems accessing subsequent lines of cells
  which contain line break tags in FF3 tables.



Added:
   branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_554616.py
Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/src/orca/scripts/toolkits/Gecko/script.py
   branches/gnome-2-24/src/orca/structural_navigation.py

Modified: branches/gnome-2-24/src/orca/scripts/toolkits/Gecko/script.py
==============================================================================
--- branches/gnome-2-24/src/orca/scripts/toolkits/Gecko/script.py	(original)
+++ branches/gnome-2-24/src/orca/scripts/toolkits/Gecko/script.py	Sat Nov  8 18:47:31 2008
@@ -5489,7 +5489,9 @@
         [prevObj, prevOffset] = \
             self.findPreviousCaretInOrder(currentLine[0][0], currentLine[0][1])
 
-        extents = self.getExtents(obj, characterOffset, characterOffset + 1)
+        extents = self.getExtents(currentLine[0][0],
+                                  currentLine[0][1],
+                                  currentLine[0][2])
         prevExtents = self.getExtents(prevObj, prevOffset, prevOffset + 1)
         while self.onSameLine(extents, prevExtents) \
               and (extents != prevExtents):
@@ -5585,7 +5587,9 @@
             self.findNextCaretInOrder(currentLine[-1][0],
                                       currentLine[-1][2] - 1)
 
-        extents = self.getExtents(obj, characterOffset, characterOffset + 1)
+        extents = self.getExtents(currentLine[-1][0],
+                                  currentLine[-1][1],
+                                  currentLine[-1][2])
         nextExtents = self.getExtents(nextObj, nextOffset, nextOffset + 1)
         while self.onSameLine(extents, nextExtents) \
               and (extents != nextExtents):

Modified: branches/gnome-2-24/src/orca/structural_navigation.py
==============================================================================
--- branches/gnome-2-24/src/orca/structural_navigation.py	(original)
+++ branches/gnome-2-24/src/orca/structural_navigation.py	Sat Nov  8 18:47:31 2008
@@ -21,7 +21,7 @@
 being implemented by Gecko; however it can be used in any
 script providing access to document content."""
 
-__id__        = "$Id$"
+__id__  = "$Id$"
 __version__   = "$Revision$"
 __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2005-2008 Sun Microsystems Inc."
@@ -3279,7 +3279,7 @@
 
         blank = self._isBlankCell(cell)
         if not blank:
-            self._presentObject(obj, characterOffset)
+            self._presentObject(cell, 0)
         else:
             # Translators: "blank" is a short word to mean the
             # user has navigated to an empty line.

Added: branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_554616.py
==============================================================================
--- (empty file)
+++ branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_554616.py	Sat Nov  8 18:47:31 2008
@@ -0,0 +1,172 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of table cell navigation output of Firefox. 
+"""
+
+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 local "simple form" test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "bug-554616.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(
+    "1. Top of file",
+    ["BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "SPEECH OUTPUT: 'Snapshot version Date (UTC) Download'"]))
+
+########################################################################
+# T to move to the table.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("t"))
+sequence.append(utils.AssertPresentationAction(
+    "2. t",
+    ["BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to top.'",
+     "SPEECH OUTPUT: 'Table with 4 rows 3 columns'",
+     "SPEECH OUTPUT: 'Snapshot version'"]))
+
+########################################################################
+# Alt+Shift+Arrow to move amongst cells
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Alt Shift Down",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'r2477 Wed Nov 5 16:39:00 2008 in', cursor=1",
+     "BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'r2477 Wed Nov 5 16:39:00 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2477'",
+     "SPEECH OUTPUT: 'Row 2, column 1.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Right"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Alt Shift Right",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'Wed Nov 5 16:39:00 2008 installe', cursor=1",
+     "BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'Wed Nov 5 16:39:00 2008 installe', cursor=1",
+     "SPEECH OUTPUT: 'Date (UTC)'",
+     "SPEECH OUTPUT: 'Wed Nov 5 16:39:00 2008'",
+     "SPEECH OUTPUT: 'Row 2, column 2.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Right"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Alt Shift Right",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'installer (10190 KB)', cursor=1",
+     "BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'installer (10190 KB)', cursor=1",
+     "SPEECH OUTPUT: 'Download'",
+     "SPEECH OUTPUT: 'installer link  (10190 KB)",
+     " portable archive link  (9154 KB)'",
+     "SPEECH OUTPUT: 'Row 2, column 3.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Down"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Alt Shift Down",
+    ["BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'installer (10193 KB)', cursor=1",
+     "BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'installer (10193 KB)', cursor=1",
+     "SPEECH OUTPUT: 'installer link  (10193 KB)",
+     " portable archive link  (9149 KB)'",
+     "SPEECH OUTPUT: 'Row 3, column 3.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Left"))
+sequence.append(utils.AssertPresentationAction(
+    "7. Alt Shift Left",
+    ["BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'Tue Nov 4 16:39:02 2008 installe', cursor=1",
+     "BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'Tue Nov 4 16:39:02 2008 installe', cursor=1",
+     "SPEECH OUTPUT: 'Date (UTC)'",
+     "SPEECH OUTPUT: 'Tue Nov 4 16:39:02 2008'",
+     "SPEECH OUTPUT: 'Row 3, column 2.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Up"))
+sequence.append(utils.AssertPresentationAction(
+    "8. Alt Shift Up",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'Wed Nov 5 16:39:00 2008 installe', cursor=1",
+     "BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'Wed Nov 5 16:39:00 2008 installe', cursor=1",
+     "SPEECH OUTPUT: 'Wed Nov 5 16:39:00 2008'",
+     "SPEECH OUTPUT: 'Row 2, column 2.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>End"))
+sequence.append(utils.AssertPresentationAction(
+    "9. Alt Shift End",
+    ["BRAILLE LINE:  'r2464 Mon Nov 3 16:39:48 2008 installer (10186 KB)'",
+     "     VISIBLE:  'installer (10186 KB)', cursor=1",
+     "BRAILLE LINE:  'r2464 Mon Nov 3 16:39:48 2008 installer (10186 KB)'",
+     "     VISIBLE:  'installer (10186 KB)', cursor=1",
+     "SPEECH OUTPUT: 'Download'",
+     "SPEECH OUTPUT: 'installer link  (10186 KB)",
+     " portable archive link  (9146 KB)'",
+     "SPEECH OUTPUT: 'Row 4, column 3.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Alt><Shift>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "10. Alt Shift Home",
+    ["BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "SPEECH OUTPUT: 'Snapshot version'",
+     "SPEECH OUTPUT: 'Row 1, column 1.'"]))
+
+########################################################################
+# 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()



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