orca r4450 - in branches/gnome-2-24: . src/orca test/html test/keystrokes/firefox
- From: joanied svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4450 - in branches/gnome-2-24: . src/orca test/html test/keystrokes/firefox
- Date: Wed, 21 Jan 2009 22:44:37 +0000 (UTC)
Author: joanied
Date: Wed Jan 21 22:44:37 2009
New Revision: 4450
URL: http://svn.gnome.org/viewvc/orca?rev=4450&view=rev
Log:
* src/orca/structural_navigation.py:
test/keystrokes/firefox/html_struct_nav_bug_567984.py: (new)
test/html/bug-567984.html: (new)
Fix for bug #567984 - Structural navigation needs to
consider text within the document frame.
Added:
branches/gnome-2-24/test/html/bug-567984.html
branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_567984.py
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/orca/structural_navigation.py
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 Wed Jan 21 22:44:37 2009
@@ -821,6 +821,14 @@
arg)
except:
debug.printException(debug.LEVEL_SEVERE)
+ else:
+ # If the document frame itself contains content and that is
+ # our current object, querying the collection interface will
+ # result in our starting at the top when looking for the next
+ # object rather than the current caret offset. See bug 567984.
+ #
+ if next and self._script.isSameObject(obj, document):
+ criteria = None
if criteria:
try:
@@ -922,6 +930,16 @@
"""
currentObj = currentObj or self.getCurrentObject()
+ document = self._getDocument()
+
+ # If the current object is the document itself, find an actual
+ # object to use as the starting point. Otherwise we're in
+ # danger of skipping over the objects in between our present
+ # location and top of the document.
+ #
+ if self._script.isSameObject(currentObj, document):
+ currentObj = self._findNextObject(currentObj, document)
+
ancestors = []
obj = currentObj.parent
if obj.getRole() in [pyatspi.ROLE_LIST, pyatspi.ROLE_TABLE]:
@@ -931,7 +949,6 @@
ancestors.append(obj)
obj = obj.parent
- document = self._getDocument()
match, wrapped = None, False
results = collection.getMatchesTo(currentObj,
matchRule,
@@ -1054,6 +1071,16 @@
"""
currentObj = currentObj or self.getCurrentObject()
+ document = self._getDocument()
+
+ # If the current object is the document itself, find an actual
+ # object to use as the starting point. Otherwise we're in
+ # danger of skipping over the objects in between our present
+ # location and top of the document.
+ #
+ if self._script.isSameObject(currentObj, document):
+ currentObj = self._findNextObject(currentObj, document)
+
ancestors = []
nestableRoles = [pyatspi.ROLE_LIST, pyatspi.ROLE_TABLE]
obj = currentObj.parent
@@ -1061,7 +1088,6 @@
ancestors.append(obj)
obj = obj.parent
- document = self._getDocument()
obj = self._findPreviousObject(currentObj, document)
wrapped = obj is None
match = None
Added: branches/gnome-2-24/test/html/bug-567984.html
==============================================================================
--- (empty file)
+++ branches/gnome-2-24/test/html/bug-567984.html Wed Jan 21 22:44:37 2009
@@ -0,0 +1,75 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
+
+<title>Index VakbaráHíortá/title>
+</head><body>
+<h1>Index VakbaráHíortá/h1><br>
+Rovatok: <br>
+<a accesskey="r" href="http://index.hu/vakbarat/politika/belfold/">Belfö/a><br>
+<a href="http://index.hu/vakbarat/politika/kulfold/">Kü</a><br>
+<a href="http://index.hu/vakbarat/tech/">Tech</a><br>
+<a href="http://index.hu/vakbarat/tudomany/">Tudomá</a><br>
+<a href="http://index.hu/vakbarat/gazdasag/">Gazdasá/a><br>
+<a href="http://index.hu/vakbarat/politika/bulvar/">Bulvá/a><br>
+<a href="http://index.hu/vakbarat/velemeny/">Vémé</a><br>
+<a href="http://index.hu/vakbarat/sport/">Sport</a><br>
+<a href="http://index.hu/vakbarat/kultur/">Kult</a><br>
+<a href="http://index.hu/vakbarat/24ora/">24ó/a>
+
+<h2>Legfrissebb hík</h2>
+
+ <p></p><h3><a href="http://index.hu/politika/kulfold/gzabk0117/?vb">Izrael bejelentette az <br>egyoldalúszü</a></h3>
+ Elééa kitû cékat, éannátöt is, éel leteszik a fegyvert. Ha a Hamá is úkarja.
+ <p></p>
+ <p></p><h3><a href="http://index.hu/politika/bulvar/huvi090117/?vb">Videó Hudsonba zuhanópü</a></h3>
+ Mindkéfelvélen láatóvíe csapó, az utasok száyakon, majd a gékivontatá a partra. <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/vilag/pgu090117/?vb">Úabb péüuru tûl, pézel együ></h3>
+ A 75 és Arthur Nadeltõöszáilliólláköelnék az üei, de méa féit sem taláá <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/magyar/elc090117/?vb">1150 embert utcá tesz a péi Elcoteq</a></h3>
+ 900 bélt é250 sajádolgozóük el. <br>Az elbocsásszáá 18 ezer föt. <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/magyar/gavzpp090107/?vb">Hamarosan úndul a gázáís</a></h3>
+ Megáapodott Putyin éTyimosenko az orosz-ukrászerzõrõAmint lepapízzá jö gá <p></p>
+ <p></p><h3><a href="http://index.hu/politika/bulvar/csepel0117/?vb">Megint autó gyútak fel Csepelen</a></h3>
+ Héautóett, kégyúatólfogtak az éel. <p></p>
+ <p></p><h3><a href="http://index.hu/vakbarat?vb">A tönõmmi</a></h3>
+ <p></p>
+ <p></p><h3><a href="http://index.hu/politika/kulfold/pupi090117/?vb">37 millióbelt é egy Putyin-festmé</a></h3>
+ Egy U-betûpet kellett festenie. Csiná egy ablakot, amit feljavíttak csipkéfüyel. <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/magyar/kespir090116/?vb">Gyurcsá: Lesz és ékeserûula is</a></h3>
+ A miniszterelnözombaton MSZP-s kéiselõl konzultá, vasáap kibõett kormáüesz. <p></p>
+ <p></p><h3><a href="http://index.hu/politika/belfold/ep5455/?vb">Siket jelöa Fidesz EP-listán</a></h3>
+ Az úkö Áer éDeutsch van a legjobb helyen. <p></p>
+ <p></p><h3><a href="http://index.hu/politika/belfold/1989/2009/01/17/tul_gyorsan_novekszik_az_mdf/?vb">Túorsan nõ MDF</a></h3>
+ A mépátáem alakult páot a belsõmlasztól féik – napi áambiztonsá jelenté <p></p>
+ <p></p><h3><a href="http://index.hu/politika/bulvar/velence9657/?vb">Éetveszées a Velencei-tógy rée</a></h3>
+ Csak a kijelöhelyen lehet korcsolyái. <p></p>
+ <p></p><h3><a href="http://index.hu/vakbarat?vb">A delphoi jóamiscsõ jelent</a></h3>
+ Klikk ide <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/vilag/usacs090117/?vb">Úabb kébankcsõz USA-ban</a></h3>
+ A 2008-at megelõhat éen öesen nem dõbe annyi bank, mint a váákezdete ó <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/vilag/dubt090117/?vb">Nem él meg az óstorony Dubajban</a></h3>
+ Ezer méres lett volna, a váámiatt ának le. Egy mák, 780 méres torony viszont elkéü <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/magyar/bnz090117/?vb">Tíforinttal is drálhat a benzin</a></h3>
+ Ha szerencsé van, csak öl fog. Az ák felmentek a viláiacon, a forint gyengü <p></p>
+ <p></p><h3><a href="http://index.hu/gazdasag/magyar/kampoll09011/?vb">Hát fordíe a jegybank a forintnak?</a></h3>
+ Az infláóéeléséa mostaninágyengé forint sem zavarnáde mi lesz a devizahitelesekkel? <p></p>
+ <p></p><h3><a href="http://index.hu/vakbarat?vb">Ú</a></h3>
+ Klikk ide <p></p>
+ <p></p><h3><a href="http://index.hu/vakbarat?vb">Dolguk, hogy töemenjenek</a></h3>
+ Klikk ide <p></p>
+ <p></p><h3><a href="http://kotottpalya.blog.hu/2009/01/17/mi_van_akkor_ha_egy_ket_vonat_mindig_kesik_visszassagok_vasutunk_vilagabol_48?vb">Mi van akkor, ha egy (ké vonat mindig kék?</a></h3>
+ Nem olyan szerelvét kük, amely meg tudna fordulni a véllomán a rendelkezée áóõatt. <p></p>
+
+Rovatok: <br>
+<a accesskey="r" href="http://index.hu/vakbarat/politika/belfold/">Belfö/a><br>
+<a href="http://index.hu/vakbarat/politika/kulfold/">Kü</a><br>
+<a href="http://index.hu/vakbarat/tech/">Tech</a><br>
+<a href="http://index.hu/vakbarat/tudomany/">Tudomá</a><br>
+<a href="http://index.hu/vakbarat/gazdasag/">Gazdasá/a><br>
+<a href="http://index.hu/vakbarat/politika/bulvar/">Bulvá/a><br>
+<a href="http://index.hu/vakbarat/velemeny/">Vémé</a><br>
+<a href="http://index.hu/vakbarat/sport/">Sport</a><br>
+<a href="http://index.hu/vakbarat/kultur/">Kult</a><br>
+<a href="http://index.hu/vakbarat/24ora/">24ó/a>
+
+</body></html>
\ No newline at end of file
Added: branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_567984.py
==============================================================================
--- (empty file)
+++ branches/gnome-2-24/test/keystrokes/firefox/html_struct_nav_bug_567984.py Wed Jan 21 22:44:37 2009
@@ -0,0 +1,162 @@
+# -*- 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(utils.firefoxFrameNames, None))
+
+########################################################################
+# Load the local "simple form" test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "bug-567984.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: 'Index VakbarÃt HÃrportÃl h1'",
+ " VISIBLE: 'Index VakbarÃt HÃrportÃl h1', cursor=1",
+ "SPEECH OUTPUT: 'Index VakbarÃt HÃrportÃl heading level 1'"]))
+
+########################################################################
+# H to move amongst headings
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("h"))
+sequence.append(utils.AssertPresentationAction(
+ "2. h",
+ ["BRAILLE LINE: 'Legfrissebb hÃrek h2'",
+ " VISIBLE: 'Legfrissebb hÃrek h2', cursor=1",
+ "SPEECH OUTPUT: 'Legfrissebb hÃrek heading level 2'"]))
+
+########################################################################
+# H to move amongst headings
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("h"))
+sequence.append(utils.AssertPresentationAction(
+ "3. h",
+ ["BRAILLE LINE: 'Izrael bejelentette az h3'",
+ " VISIBLE: 'Izrael bejelentette az h3', cursor=1",
+ "SPEECH OUTPUT: 'Izrael bejelentette az ",
+ "egyoldalà tÃzszÃnetet link heading level 3'"]))
+
+########################################################################
+# H to move amongst headings
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("h"))
+sequence.append(utils.AssertPresentationAction(
+ "4. h",
+ ["BRAILLE LINE: 'VideÃk a Hudsonba zuhanà repÃlÃrÃl h3'",
+ " VISIBLE: 'VideÃk a Hudsonba zuhanà repÃlÃr', cursor=1",
+ "SPEECH OUTPUT: 'VideÃk a Hudsonba zuhanà repÃlÃrÃl link heading level 3'"]))
+
+########################################################################
+# H to move amongst headings
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("h"))
+sequence.append(utils.AssertPresentationAction(
+ "5. h",
+ ["BRAILLE LINE: 'Ãjabb pÃnzÃgyi guru tÃnt el, pÃnzzel egyÃtt h3'",
+ " VISIBLE: 'Ãjabb pÃnzÃgyi guru tÃnt el, pÃn', cursor=1",
+ "SPEECH OUTPUT: 'Ãjabb pÃnzÃgyi guru tÃnt el, pÃnzzel egyÃtt link heading level 3'"]))
+
+########################################################################
+# Down Arrow to move to some text in the document frame
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "6. Down",
+ ["BRAILLE LINE: 'A 75 Ãves Arthur NadeltÃl tÃbb szÃzmillià dollÃr kÃvetelnÃnek az Ãgyfelei, de mÃg a fÃrfit sem talÃljÃk.'",
+ " VISIBLE: 'A 75 Ãves Arthur NadeltÃl tÃbb s', cursor=1",
+ "SPEECH OUTPUT: 'A 75 Ãves Arthur NadeltÃl tÃbb szÃzmillià dollÃr kÃvetelnÃnek az Ãgyfelei, de mÃg a fÃrfit sem talÃljÃk.'"]))
+
+########################################################################
+# Down Arrow to move to some text in the document frame
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "7. Down",
+ ["BRAILLE LINE: '1150 embert utcÃra tesz a pÃcsi Elcoteq h3'",
+ " VISIBLE: '1150 embert utcÃra tesz a pÃcsi ', cursor=1",
+ "SPEECH OUTPUT: '1150 embert utcÃra tesz a pÃcsi Elcoteq link heading level 3'"]))
+
+########################################################################
+# H to move to the next heading. It should NOT be the first heading.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("h"))
+sequence.append(utils.AssertPresentationAction(
+ "8. h",
+ ["BRAILLE LINE: 'Hamarosan Ãjraindul a gÃzszÃllÃtÃs h3'",
+ " VISIBLE: 'Hamarosan Ãjraindul a gÃzszÃllÃt', cursor=1",
+ "SPEECH OUTPUT: 'Hamarosan Ãjraindul a gÃzszÃllÃtÃs link heading level 3'"]))
+
+########################################################################
+# Down Arrow to move to some text in the document frame
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+ "9. Down",
+ ["BRAILLE LINE: 'MegÃllapodott Putyin Ãs Tyimosenko az orosz-ukrÃn szerzÃdÃsrÃl. Amint lepapÃrozzÃk, jÃn a gÃz.'",
+ " VISIBLE: 'MegÃllapodott Putyin Ãs Tyimosen', cursor=1",
+ "SPEECH OUTPUT: 'MegÃllapodott Putyin Ãs Tyimosenko az orosz-ukrÃn szerzÃdÃsrÃl. Amint lepapÃrozzÃk, jÃn a gÃz.'"]))
+
+########################################################################
+# Shift+ H to move to the previous heading. It should NOT be the last
+# heading.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>h"))
+sequence.append(utils.AssertPresentationAction(
+ "10. Shift+h",
+ ["BRAILLE LINE: 'Hamarosan Ãjraindul a gÃzszÃllÃtÃs h3'",
+ " VISIBLE: 'Hamarosan Ãjraindul a gÃzszÃllÃt', cursor=1",
+ "SPEECH OUTPUT: 'Hamarosan Ãjraindul a gÃzszÃllÃtÃs link heading level 3'"]))
+
+########################################################################
+# 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(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]