[orca] Don't return a "useless" as the next/previous caret context
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't return a "useless" as the next/previous caret context
- Date: Mon, 7 Sep 2015 19:56:33 +0000 (UTC)
commit ffd28abadb3146063c10154362b4cce577aa953b
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Sep 7 15:50:52 2015 -0400
Don't return a "useless" as the next/previous caret context
src/orca/scripts/web/script_utilities.py | 6 ++-
.../keystrokes/firefox/line_nav_iframes_blogger.py | 41 +++++++------------
2 files changed, 19 insertions(+), 28 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 584bd4a..f91986a 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2343,7 +2343,8 @@ class Utilities(script_utilities.Utilities):
return obj, i
elif not self.doNotDescendForCaret(obj) and obj.childCount:
return self.findNextCaretInOrder(obj[0], -1)
- elif offset < 0 and not self.isTextBlockElement(obj) and not self.hasNoSize(obj):
+ elif offset < 0 and not self.isTextBlockElement(obj) and not self.hasNoSize(obj) \
+ and not self.isUselessImage(obj):
return obj, 0
# If we're here, start looking up the the tree, up to the document.
@@ -2402,7 +2403,8 @@ class Utilities(script_utilities.Utilities):
return obj, i
elif not self.doNotDescendForCaret(obj) and obj.childCount:
return self.findPreviousCaretInOrder(obj[obj.childCount - 1], -1)
- elif offset < 0 and not self.isTextBlockElement(obj) and not self.hasNoSize(obj):
+ elif offset < 0 and not self.isTextBlockElement(obj) and not self.hasNoSize(obj) \
+ and not self.isUselessImage(obj):
return obj, 0
# If we're here, start looking up the the tree, up to the document.
diff --git a/test/keystrokes/firefox/line_nav_iframes_blogger.py
b/test/keystrokes/firefox/line_nav_iframes_blogger.py
index 56b005f..e5965b2 100644
--- a/test/keystrokes/firefox/line_nav_iframes_blogger.py
+++ b/test/keystrokes/firefox/line_nav_iframes_blogger.py
@@ -44,45 +44,34 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"5. Line Down",
- ["BRAILLE LINE: 'Go to Blogger.com Search $l Search this blog image'",
- " VISIBLE: 'Go to Blogger.com Search $l Sea', cursor=1",
- "SPEECH OUTPUT: 'Go to Blogger.com link.'",
- "SPEECH OUTPUT: 'Search entry'",
- "SPEECH OUTPUT: 'Search this blog link.'",
- "SPEECH OUTPUT: 'clickable'",
- "SPEECH OUTPUT: 'image'"]))
+ ["BRAILLE LINE: 'After the iframe'",
+ " VISIBLE: 'After the iframe', cursor=1",
+ "SPEECH OUTPUT: 'After the iframe'"]))
sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Down"))
+sequence.append(KeyComboAction("Up"))
sequence.append(utils.AssertPresentationAction(
- "6. Line Down",
- ["KNOWN ISSUE: We are stuck in this iframe",
- "BRAILLE LINE: 'Go to Blogger.com Search $l Search this blog image'",
+ "7. Line Up",
+ ["BRAILLE LINE: 'Go to Blogger.com Search $l Search this blog & y Click here to publicly +1 this.
toggle button 15 More Next Blog»Create Blog Sign In'",
" VISIBLE: 'Go to Blogger.com Search $l Sea', cursor=1",
"SPEECH OUTPUT: 'Go to Blogger.com link.'",
"SPEECH OUTPUT: 'Search entry'",
"SPEECH OUTPUT: 'Search this blog link.'",
"SPEECH OUTPUT: 'clickable'",
- "SPEECH OUTPUT: 'image'"]))
-
-sequence.append(utils.StartRecordingAction())
-sequence.append(KeyComboAction("Up"))
-sequence.append(utils.AssertPresentationAction(
- "7. Line Up",
- [""]))
+ "SPEECH OUTPUT: 'Click here to publicly +1 this. toggle button not pressed'",
+ "SPEECH OUTPUT: '15'",
+ "SPEECH OUTPUT: 'More link.'",
+ "SPEECH OUTPUT: 'Next Blog» link.'",
+ "SPEECH OUTPUT: 'Create Blog link.'",
+ "SPEECH OUTPUT: 'Sign In link.'"]))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"8. Line Down",
- ["KNOWN ISSUE: We are stuck in this iframe",
- "BRAILLE LINE: 'Go to Blogger.com Search $l Search this blog image'",
- " VISIBLE: 'Go to Blogger.com Search $l Sea', cursor=1",
- "SPEECH OUTPUT: 'Go to Blogger.com link.'",
- "SPEECH OUTPUT: 'Search entry'",
- "SPEECH OUTPUT: 'Search this blog link.'",
- "SPEECH OUTPUT: 'clickable'",
- "SPEECH OUTPUT: 'image'"]))
+ ["BRAILLE LINE: 'After the iframe'",
+ " VISIBLE: 'After the iframe', cursor=1",
+ "SPEECH OUTPUT: 'After the iframe'"]))
sequence.append(utils.AssertionSummaryAction())
sequence.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]