[orca] Fix (part two) of bgo#591351 - SayAll document function doesn't work correctly on some webpages.
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [orca] Fix (part two) of bgo#591351 - SayAll document function doesn't work correctly on some webpages.
- Date: Tue, 11 Aug 2009 19:27:37 +0000 (UTC)
commit 5ededf4f8795b4a182ecf929f79892bc951c32d1
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Tue Aug 11 02:26:53 2009 -0400
Fix (part two) of bgo#591351 - SayAll document function doesn't work correctly on some webpages.
src/orca/scripts/toolkits/Gecko/script.py | 7 +++++++
test/html/bug-591351-1.html | 2 ++
test/keystrokes/firefox/sayAll_bug-591351-1.py | 3 ++-
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index d68b7a3..ab047c4 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -70,6 +70,7 @@ from bookmarks import GeckoBookmarks
from structural_navigation import GeckoStructuralNavigation
from orca.orca_i18n import _
+from orca.speech_generator import Pause
########################################################################
# #
@@ -1216,6 +1217,12 @@ class Script(default.Script):
[element, voice] = clumped[i]
if isinstance(element, basestring):
element = self.adjustForRepeats(element)
+ if isinstance(element, Pause):
+ # At the moment, SayAllContext is expecting a string; not
+ # a Pause. For now, being conservative and catching that
+ # here. See bug #591351.
+ #
+ continue
yield [speechserver.SayAllContext(obj, element,
startOffset, endOffset),
voice]
diff --git a/test/html/bug-591351-1.html b/test/html/bug-591351-1.html
index b2f80d5..a5ba5f8 100644
--- a/test/html/bug-591351-1.html
+++ b/test/html/bug-591351-1.html
@@ -6,5 +6,7 @@
Hello world.<br><br><br><bevezeto><p>I wonder what a bevezeto is. I should Google that.</p></bevezeto><br><br><p></p>
<p><p>Aha! It is the Hungarian word for "Introduction". Here is some <a href="http://translate.google.com/translate_t?hl=en#hu|en|bevezeto">proof</a>. I really think we need to get Attila to teach the Orca team some Hungarian. Maybe one (really easy) phrase per bug comment.</p>
<p>
+<hr>
+<a href="foo">Foo</a>
</body>
</html>
diff --git a/test/keystrokes/firefox/sayAll_bug-591351-1.py b/test/keystrokes/firefox/sayAll_bug-591351-1.py
index 31ab390..ca3275f 100644
--- a/test/keystrokes/firefox/sayAll_bug-591351-1.py
+++ b/test/keystrokes/firefox/sayAll_bug-591351-1.py
@@ -52,7 +52,8 @@ sequence.append(utils.AssertPresentationAction(
"",
" I wonder what a bevezeto is. I should Google that.",
"",
- " Aha! It is the Hungarian word for \"Introduction\". Here is some proof link . I really think we need to get Attila to teach the Orca team some Hungarian. Maybe one (really easy) phrase per bug comment.'"]))
+ " Aha! It is the Hungarian word for \"Introduction\". Here is some proof link . I really think we need to get Attila to teach the Orca team some Hungarian. Maybe one (really easy) phrase per bug comment. separator'",
+ "SPEECH OUTPUT: ' Foo link",]))
########################################################################
# Move to the location bar by pressing Control+L. When it has focus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]