orca r3522 - in trunk: . test/html test/keystrokes/firefox



Author: joanied
Date: Tue Jan 29 19:33:18 2008
New Revision: 3522
URL: http://svn.gnome.org/viewvc/orca?rev=3522&view=rev

Log:
* test/keystrokes/firefox/bug_512303.py: (new)
  test/keystrokes/firefox/bug_511389.py: (new)
  test/keystrokes/firefox/flat_review_text_by_line.py: (new)
  test/keystrokes/firefox/flat_review_text_by_word_and_char.py: (new)
  test/html/table-caption.html: (new)
  test/html/bug-511389.html: (new)
  New regression tests.


Added:
   trunk/test/html/bug-511389.html   (contents, props changed)
   trunk/test/html/table-caption.html
   trunk/test/keystrokes/firefox/bug_511389.py
   trunk/test/keystrokes/firefox/bug_512303.py
   trunk/test/keystrokes/firefox/flat_review_text_by_line.py
   trunk/test/keystrokes/firefox/flat_review_text_by_word_and_char.py
Modified:
   trunk/ChangeLog

Added: trunk/test/html/bug-511389.html
==============================================================================
--- (empty file)
+++ trunk/test/html/bug-511389.html	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>Link test</title>
+</head>
+<body>
+<p>
+<a href="foobar">Hello world</a>,  this is a test.
+</p>
+<a href="foo">Foo</a><br />
+<a href="bar">Bar</a><br />
+The end.
+</body>
+</html>

Added: trunk/test/html/table-caption.html
==============================================================================
--- (empty file)
+++ trunk/test/html/table-caption.html	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,19 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+<title>a test page</title>
+</head><body text="yellow" bgcolor="black">
+<p>Below is a table, with some sample table data</p>
+
+<table>
+<caption><strong><b><font size="29">this is a caption for this table</font></b></strong></caption>
+<thead>
+<tr><th>col1</th><th>col2</th><th>col3</th></tr>
+</thead>
+<tbody>
+<tr><td>1</td><td>2</td><td>3</td></tr>
+<tr><td>4</td><td>5</td><td>6</td></tr>
+<tr><td>7</td><td>8</td><td>9</td></tr>
+</tbody></table>
+<p>hope the table looks pretty</p>
+</body></html>
\ No newline at end of file

Added: trunk/test/keystrokes/firefox/bug_511389.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/bug_511389.py	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of the fix for bug 511389."""
+
+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-511389.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Hello world Link , this is a test.'",
+     "     VISIBLE:  'Hello world Link , this is a tes', cursor=1",
+     "SPEECH OUTPUT: 'Hello world link , this is a test.'"]))
+
+########################################################################
+# Down Arrow to the link.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  'Foo Link'",
+     "     VISIBLE:  'Foo Link', cursor=1",
+     "SPEECH OUTPUT: 'Foo link'"]))
+
+########################################################################
+# Tab forward.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "Tab",
+    ["BRAILLE LINE:  'Bar Link'",
+     "     VISIBLE:  'Bar Link', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Bar link'"]))
+
+########################################################################
+# Shift+Tab back.  The bug was that we weren't speaking the link in
+# this instance.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "Shift Tab",
+    ["BRAILLE LINE:  'Foo Link'",
+     "     VISIBLE:  'Foo Link', cursor=0",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Foo link'"]))
+
+########################################################################
+# 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.start()

Added: trunk/test/keystrokes/firefox/bug_512303.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/bug_512303.py	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,157 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of the fix for bug 512303."""
+
+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 + "table-caption.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Below is a table, with some sample table data'",
+     "     VISIBLE:  'Below is a table, with some samp', cursor=1",
+     "SPEECH OUTPUT: 'Below is a table, with some sample table data'"]))
+
+########################################################################
+# Down Arrow to the bottom.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  'this is a caption for this table Caption'",
+     "     VISIBLE:  'this is a caption for this table', cursor=1",
+     "SPEECH OUTPUT: 'this is a caption for this table caption'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  'col1 col2 col3'",
+     "     VISIBLE:  'col1 col2 col3', cursor=1",
+     "SPEECH OUTPUT: 'col1 col2 col3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  '1 2 3'",
+     "     VISIBLE:  '1 2 3', cursor=1",
+     "SPEECH OUTPUT: '1 2 3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  '4 5 6'",
+     "     VISIBLE:  '4 5 6', cursor=1",
+     "SPEECH OUTPUT: '4 5 6'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  '7 8 9'",
+     "     VISIBLE:  '7 8 9', cursor=1",
+     "SPEECH OUTPUT: '7 8 9'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Down",
+    ["BRAILLE LINE:  'hope the table looks pretty'",
+     "     VISIBLE:  'hope the table looks pretty', cursor=1",
+     "SPEECH OUTPUT: 'hope the table looks pretty'"]))
+
+########################################################################
+# Up Arrow to the bottom.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  '7 8 9'",
+     "     VISIBLE:  '7 8 9', cursor=1",
+     "SPEECH OUTPUT: '7 8 9'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  '4 5 6'",
+     "     VISIBLE:  '4 5 6', cursor=1",
+     "SPEECH OUTPUT: '4 5 6'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  '1 2 3'",
+     "     VISIBLE:  '1 2 3', cursor=1",
+     "SPEECH OUTPUT: '1 2 3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  'col1 col2 col3'",
+     "     VISIBLE:  'col1 col2 col3', cursor=1",
+     "SPEECH OUTPUT: 'col1 col2 col3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  'this is a caption for this table Caption'",
+     "     VISIBLE:  'this is a caption for this table', cursor=1",
+     "SPEECH OUTPUT: 'this is a caption for this table caption'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "Line Up",
+    ["BRAILLE LINE:  'Below is a table, with some sample table data'",
+     "     VISIBLE:  'Below is a table, with some samp', cursor=1",
+     "SPEECH OUTPUT: 'Below is a table, with some sample table data'"]))
+
+########################################################################
+# 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.start()

Added: trunk/test/keystrokes/firefox/flat_review_text_by_line.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/flat_review_text_by_line.py	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,257 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of flat review by line in a simple text document."""
+
+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 blockquote test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "blockquotes.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+sequence.append(WaitForFocus("Blockquote Regression Test",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+sequence.append(PauseAction(3000))
+
+########################################################################
+# Read the current line with KP_8.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_8"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review current line", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On weaponry:'"]))
+
+########################################################################
+# Read the rest of the document with KP_9.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
+     "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'surprise. Our two weapons are fear and surprise. And ruthless efficiency. Our three weapons are fear,  $l'",
+     "     VISIBLE:  'surprise. Our two weapons are fe', cursor=1",
+     "SPEECH OUTPUT: 'surprise. Our two weapons are fear and surprise. And ruthless efficiency. Our three weapons are fear, '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'surprise, and ruthless efficiency. And an almost fanatical devotion to the Pope. Our four. No. Amongst  $l'",
+     "     VISIBLE:  'surprise, and ruthless efficienc', cursor=1",
+     "SPEECH OUTPUT: 'surprise, and ruthless efficiency. And an almost fanatical devotion to the Pope. Our four. No. Amongst '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'our weapons. Amongst our weaponry, are such elements as fear, surprise. I'll come in again. NOBODY  $l'",
+     "     VISIBLE:  'our weapons. Amongst our weaponr', cursor=1",
+     "SPEECH OUTPUT: 'our weapons. Amongst our weaponry, are such elements as fear, surprise. I'll come in again. NOBODY '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'expects the Spanish Inquisition! Amongst our weaponry are such diverse elements as: fear, surprise,  $l'",
+     "     VISIBLE:  'expects the Spanish Inquisition!', cursor=1",
+     "SPEECH OUTPUT: 'expects the Spanish Inquisition! Amongst our weaponry are such diverse elements as: fear, surprise, '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms - Oh damn!  $l'",
+     "     VISIBLE:  'ruthless efficiency, an almost f', cursor=1",
+     "SPEECH OUTPUT: 'ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms - Oh damn! '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'On old ladies: $l'",
+     "     VISIBLE:  'On old ladies: $l', cursor=1",
+     "SPEECH OUTPUT: 'On old ladies:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject the works of the  $l'",
+     "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
+     "SPEECH OUTPUT: 'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject the works of the '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'ungodly. Two last chances. And you shall be free. Three last chances. You have three last chances, the  $l'",
+     "     VISIBLE:  'ungodly. Two last chances. And y', cursor=1",
+     "SPEECH OUTPUT: 'ungodly. Two last chances. And you shall be free. Three last chances. You have three last chances, the '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'nature of which I have divulged in my previous utterance.  $l'",
+     "     VISIBLE:  'nature of which I have divulged ', cursor=1",
+     "SPEECH OUTPUT: 'nature of which I have divulged in my previous utterance. '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'On castle decor: $l'",
+     "     VISIBLE:  'On castle decor: $l', cursor=1",
+     "SPEECH OUTPUT: 'On castle decor:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_9"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next line", 
+    ["BRAILLE LINE:  'Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR!  $l'",
+     "     VISIBLE:  'Hm! She is made of harder stuff!', cursor=1",
+     "SPEECH OUTPUT: 'Hm! She is made of harder stuff! Cardinal Fang! Fetch the COMFY CHAIR! '"]))
+
+########################################################################
+# Read the document in reverse order with KP_7.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'On castle decor: $l'",
+     "     VISIBLE:  'On castle decor: $l', cursor=1",
+     "SPEECH OUTPUT: 'On castle decor:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'nature of which I have divulged in my previous utterance.  $l'",
+     "     VISIBLE:  'nature of which I have divulged ', cursor=1",
+     "SPEECH OUTPUT: 'nature of which I have divulged in my previous utterance. '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'ungodly. Two last chances. And you shall be free. Three last chances. You have three last chances, the  $l'",
+     "     VISIBLE:  'ungodly. Two last chances. And y', cursor=1",
+     "SPEECH OUTPUT: 'ungodly. Two last chances. And you shall be free. Three last chances. You have three last chances, the '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject the works of the  $l'",
+     "     VISIBLE:  'Now old lady, you have one last ', cursor=1",
+     "SPEECH OUTPUT: 'Now old lady, you have one last chance. Confess the heinous sin of heresy, reject the works of the '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'On old ladies: $l'",
+     "     VISIBLE:  'On old ladies: $l', cursor=1",
+     "SPEECH OUTPUT: 'On old ladies:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms - Oh damn!  $l'",
+     "     VISIBLE:  'ruthless efficiency, an almost f', cursor=1",
+     "SPEECH OUTPUT: 'ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms - Oh damn! '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'expects the Spanish Inquisition! Amongst our weaponry are such diverse elements as: fear, surprise,  $l'",
+     "     VISIBLE:  'expects the Spanish Inquisition!', cursor=1",
+     "SPEECH OUTPUT: 'expects the Spanish Inquisition! Amongst our weaponry are such diverse elements as: fear, surprise, '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'our weapons. Amongst our weaponry, are such elements as fear, surprise. I'll come in again. NOBODY  $l'",
+     "     VISIBLE:  'our weapons. Amongst our weaponr', cursor=1",
+     "SPEECH OUTPUT: 'our weapons. Amongst our weaponry, are such elements as fear, surprise. I'll come in again. NOBODY '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'surprise, and ruthless efficiency. And an almost fanatical devotion to the Pope. Our four. No. Amongst  $l'",
+     "     VISIBLE:  'surprise, and ruthless efficienc', cursor=1",
+     "SPEECH OUTPUT: 'surprise, and ruthless efficiency. And an almost fanatical devotion to the Pope. Our four. No. Amongst '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'surprise. Our two weapons are fear and surprise. And ruthless efficiency. Our three weapons are fear,  $l'",
+     "     VISIBLE:  'surprise. Our two weapons are fe', cursor=1",
+     "SPEECH OUTPUT: 'surprise. Our two weapons are fear and surprise. And ruthless efficiency. Our three weapons are fear, '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
+     "SPEECH OUTPUT: 'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_7"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous line", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On weaponry:'"]))
+
+########################################################################
+# 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.start()

Added: trunk/test/keystrokes/firefox/flat_review_text_by_word_and_char.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/flat_review_text_by_word_and_char.py	Tue Jan 29 19:33:18 2008
@@ -0,0 +1,359 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of flat review by word and char in a simple text document."""
+
+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 blockquote test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "blockquotes.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+sequence.append(WaitForFocus("Blockquote Regression Test",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+sequence.append(PauseAction(3000))
+
+########################################################################
+# Read the current word with KP_5.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review current word", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On'"]))
+
+########################################################################
+# Spell the current word with KP_5 2x.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(utils.AssertPresentationAction(
+    "spell current word", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On'",
+     "SPEECH OUTPUT: 'O'",
+     "SPEECH OUTPUT: 'n'"]))
+
+########################################################################
+# Spell the current word phonetically with KP_5 3x.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(KeyComboAction("KP_5"))
+sequence.append(utils.AssertPresentationAction(
+    "spell current word phonetically", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On'",
+     "SPEECH OUTPUT: 'O'",
+     "SPEECH OUTPUT: 'n'",
+     "SPEECH OUTPUT: 'oscar'",
+     "SPEECH OUTPUT: 'november'"]))
+
+########################################################################
+# Read forward word by word with KP_6.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=4",
+     "SPEECH OUTPUT: 'weaponry:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
+     "SPEECH OUTPUT: 'NOBODY'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=8",
+     "SPEECH OUTPUT: 'expects'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=16",
+     "SPEECH OUTPUT: 'the'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=20",
+     "SPEECH OUTPUT: 'Spanish'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=28",
+     "SPEECH OUTPUT: 'Inquisition!'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=9",
+     "SPEECH OUTPUT: 'Our'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=13",
+     "SPEECH OUTPUT: 'chief'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=19",
+     "SPEECH OUTPUT: 'weapon'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_6"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=26",
+     "SPEECH OUTPUT: 'is'"]))
+
+########################################################################
+# Read the current char with KP_2.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_2"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review current char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=26",
+     "SPEECH OUTPUT: 'i'"]))
+
+########################################################################
+# Read forward char by char with KP_3.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_3"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=27",
+     "SPEECH OUTPUT: 's'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_3"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=28",
+     "SPEECH OUTPUT: ' '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_3"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=29",
+     "SPEECH OUTPUT: 's'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_3"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=30",
+     "SPEECH OUTPUT: 'u'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_3"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review next char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=31",
+     "SPEECH OUTPUT: 'r'"]))
+
+########################################################################
+# Read backwards char by char with KP_1.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_1"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=30",
+     "SPEECH OUTPUT: 'u'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_1"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=29",
+     "SPEECH OUTPUT: 's'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_1"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=28",
+     "SPEECH OUTPUT: ' '"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_1"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=27",
+     "SPEECH OUTPUT: 's'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_1"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous char", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=26",
+     "SPEECH OUTPUT: 'i'"]))
+
+########################################################################
+# Read backwards word by word with KP_4.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=19",
+     "SPEECH OUTPUT: 'weapon'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=13",
+     "SPEECH OUTPUT: 'chief'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'sition! Our chief weapon is surp', cursor=9",
+     "SPEECH OUTPUT: 'Our'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=28",
+     "SPEECH OUTPUT: 'Inquisition!'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=20",
+     "SPEECH OUTPUT: 'Spanish'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=16",
+     "SPEECH OUTPUT: 'the'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=8",
+     "SPEECH OUTPUT: 'expects'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'NOBODY expects the Spanish Inquisition! Our chief weapon is surprise. Surprise and fear. Fear and  $l'",
+     "     VISIBLE:  'NOBODY expects the Spanish Inqui', cursor=1",
+     "SPEECH OUTPUT: 'NOBODY'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=4",
+     "SPEECH OUTPUT: 'weaponry:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("KP_4"))
+sequence.append(utils.AssertPresentationAction(
+    "flat review previous word", 
+    ["BRAILLE LINE:  'On weaponry: $l'",
+     "     VISIBLE:  'On weaponry: $l', cursor=1",
+     "SPEECH OUTPUT: 'On'"]))
+
+########################################################################
+# 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.start()



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