orca r4530 - trunk/test/keystrokes/firefox



Author: joanied
Date: Thu Feb 12 09:34:15 2009
New Revision: 4530
URL: http://svn.gnome.org/viewvc/orca?rev=4530&view=rev

Log:
Two new regression tests for bug 570564.


Added:
   trunk/test/keystrokes/firefox/codetalks_panel_text.py
   trunk/test/keystrokes/firefox/dojo_panel_text.py

Added: trunk/test/keystrokes/firefox/codetalks_panel_text.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/codetalks_panel_text.py	Thu Feb 12 09:34:15 2009
@@ -0,0 +1,187 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of presentation of Codetalk's panel text using Firefox.
+"""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
+
+########################################################################
+# Load the Tab Panel demo.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_ENTRY))
+sequence.append(TypeAction("http://codetalks.org/source/widgets/tabpanel/tabpanel.html";))
+sequence.append(KeyComboAction("Return"))
+sequence.append(WaitForDocLoad())
+
+sequence.append(PauseAction(5000))
+
+########################################################################
+# Down Arrow from the page tab to the panel text.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Down Arrow", 
+    ["BUG? - Not presenting the first line in the panel"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Down Arrow", 
+    ["BRAILLE LINE:  'This example requires Firefox 3 or later to work with screen readers -- it uses ARIA properties without namespaces, which is now'",
+     "     VISIBLE:  'This example requires Firefox 3 ', cursor=4",
+     "SPEECH OUTPUT: 'This example requires Firefox 3 or later to work with screen readers -- it uses ARIA properties without namespaces, which is now'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Down Arrow", 
+    ["BRAILLE LINE:  'the correct markup.'",
+     "     VISIBLE:  'the correct markup.', cursor=1",
+     "SPEECH OUTPUT: 'the correct markup.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Down Arrow", 
+    ["BRAILLE LINE:  'Use tab key to reach the tab. Once a tab has focus use:'",
+     "     VISIBLE:  'Use tab key to reach the tab. On', cursor=1",
+     "SPEECH OUTPUT: 'Use tab key to reach the tab. Once a tab has focus use:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Down Arrow", 
+    ["BRAILLE LINE:  'â left and right arrows to move from tab to tab. Panel is made visible when tab gets focus. Arrow keys do not cycle around the'",
+     "     VISIBLE:  'â left and right arrows to move ', cursor=1",
+     "SPEECH OUTPUT: 'â left and right arrows to move from tab to tab. Panel is made visible when tab gets focus. Arrow keys do not cycle around the'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Down Arrow", 
+    ["BRAILLE LINE:  'tabs'",
+     "     VISIBLE:  'tabs', cursor=1",
+     "SPEECH OUTPUT: 'tabs'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "7. Down Arrow", 
+    ["BRAILLE LINE:  'â ctrl-left and ctrl-right arrows behave the same as left and right arrows'",
+     "     VISIBLE:  'â ctrl-left and ctrl-right arrow', cursor=1",
+     "SPEECH OUTPUT: 'â ctrl-left and ctrl-right arrows behave the same as left and right arrows'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "8. Down Arrow", 
+    ["BRAILLE LINE:  'â ctrl-shift-pageup / ctrl-shift-pagedown is the same as left and right arrows but WILL cycle around the tab order \(shift was added'",
+     "     VISIBLE:  'â ctrl-shift-pageup / ctrl-shift', cursor=1",
+     "SPEECH OUTPUT: 'â ctrl-shift-pageup / ctrl-shift-pagedown is the same as left and right arrows but WILL cycle around the tab order \(shift was added'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "9. Down Arrow", 
+    ["BRAILLE LINE:  'as a modifier so as not to conflict with the Firefox tabbing keys\)'",
+     "     VISIBLE:  'as a modifier so as not to confl', cursor=1",
+     "SPEECH OUTPUT: 'as a modifier so as not to conflict with the Firefox tabbing keys\)'"]))
+
+########################################################################
+# Up Arrow through the panel text back to the page tab.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Up Arrow", 
+    ["BRAILLE LINE:  'â ctrl-shift-pageup / ctrl-shift-pagedown is the same as left and right arrows but WILL cycle around the tab order \(shift was added'",
+     "     VISIBLE:  'â ctrl-shift-pageup / ctrl-shift', cursor=1",
+     "SPEECH OUTPUT: 'â ctrl-shift-pageup / ctrl-shift-pagedown is the same as left and right arrows but WILL cycle around the tab order \(shift was added'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Up Arrow", 
+    ["BRAILLE LINE:  'â ctrl-left and ctrl-right arrows behave the same as left and right arrows'",
+     "     VISIBLE:  'â ctrl-left and ctrl-right arrow', cursor=1",
+     "SPEECH OUTPUT: 'â ctrl-left and ctrl-right arrows behave the same as left and right arrows'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Up Arrow", 
+    ["BRAILLE LINE:  'tabs'",
+     "     VISIBLE:  'tabs', cursor=1",
+     "SPEECH OUTPUT: 'tabs'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Up Arrow", 
+    ["BRAILLE LINE:  'â left and right arrows to move from tab to tab. Panel is made visible when tab gets focus. Arrow keys do not cycle around the'",
+     "     VISIBLE:  'â left and right arrows to move ', cursor=1",
+     "SPEECH OUTPUT: 'â left and right arrows to move from tab to tab. Panel is made visible when tab gets focus. Arrow keys do not cycle around the'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Up Arrow", 
+    ["BRAILLE LINE:  'Use tab key to reach the tab. Once a tab has focus use:'",
+     "     VISIBLE:  'Use tab key to reach the tab. On', cursor=1",
+     "SPEECH OUTPUT: 'Use tab key to reach the tab. Once a tab has focus use:'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Up Arrow", 
+    ["BRAILLE LINE:  'the correct markup.'",
+     "     VISIBLE:  'the correct markup.', cursor=1",
+     "SPEECH OUTPUT: 'the correct markup.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "7. Up Arrow", 
+    ["BRAILLE LINE:  'This example requires Firefox 3 or later to work with screen readers -- it uses ARIA properties without namespaces, which is now'",
+     "     VISIBLE:  'This example requires Firefox 3 ', cursor=1",
+     "SPEECH OUTPUT: 'This example requires Firefox 3 or later to work with screen readers -- it uses ARIA properties without namespaces, which is now'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "8. Up Arrow", 
+    ["BRAILLE LINE:  'Panel 0'",
+     "     VISIBLE:  'Panel 0', cursor=1",
+     "SPEECH OUTPUT: 'Panel 0 scroll pane'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "9. Up Arrow", 
+    ["BRAILLE LINE:  'Tab Zero Page Tab One Page Tab Two Page Tab Three Page Tab Four Page'",
+     "     VISIBLE:  'Tab Zero Page Tab One Page Tab T', cursor=1",
+     "SPEECH OUTPUT: 'Tab Zero page Tab One page Tab Two page Tab Three page Tab Four page'"]))
+
+########################################################################
+# Close the demo
+#
+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()

Added: trunk/test/keystrokes/firefox/dojo_panel_text.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/dojo_panel_text.py	Thu Feb 12 09:34:15 2009
@@ -0,0 +1,181 @@
+#!/usr/bin/python
+
+"""Test of presentation of Dojo's panel text using Firefox.
+"""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
+
+########################################################################
+# Load the Test Dialog demo.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus(acc_role=pyatspi.ROLE_ENTRY))
+sequence.append(TypeAction(utils.DojoNightlyURLPrefix + "test_Dialog.html"))
+sequence.append(KeyComboAction("Return"))
+sequence.append(WaitForDocLoad())
+
+sequence.append(PauseAction(5000))
+
+########################################################################
+# Tab to the third button "Show TabContainer Dialog" and press it.
+#
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.StartRecordingAction())
+sequence.append(TypeAction(" "))
+sequence.append(utils.AssertPresentationAction(
+    "Space to press the Show TabContainer Dialog", 
+    ["BUG? - A dialog has appeared. Shouldn't we say something?"]))
+
+########################################################################
+# Right Arrow to the Second tab page
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Right"))
+sequence.append(utils.AssertPresentationAction(
+    "Right Arrow to the Second tab page", 
+    ["BRAILLE LINE:  'First tab Page Image Second tab Page Image'",
+     "     VISIBLE:  'Second tab Page Image', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Second tab page'"]))
+
+########################################################################
+# Tab to the panel.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "Tab into the panel", 
+    ["BUG? - Speech isn't getting the first line",
+     "BRAILLE LINE:  'This is the second tab.'",
+     "     VISIBLE:  'This is the second tab.', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'panel'"]))
+
+########################################################################
+# Down Arrow from the page tab to the panel text.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Down Arrow", 
+    ["BRAILLE LINE:  'Make it overflow. ipsum dolor sit amet, consectetuer adipiscing elit.'",
+     "     VISIBLE:  'Make it overflow. ipsum dolor si', cursor=1",
+     "SPEECH OUTPUT: 'Make it overflow. ipsum dolor sit amet link , consectetuer adipiscing elit.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Down Arrow", 
+    ["BRAILLE LINE:  'Aenean semper sagittis velit. Cras in mi. Duis porta mauris ut'",
+     "     VISIBLE:  'Aenean semper sagittis velit. Cr', cursor=1",
+     "SPEECH OUTPUT: 'Aenean semper sagittis velit. Cras in mi. Duis porta mauris ut'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Down Arrow", 
+    ["BRAILLE LINE:  'ligula. Proin porta rutrum lacus. Etiam consequat scelerisque'",
+     "     VISIBLE:  'ligula. Proin porta rutrum lacus', cursor=1",
+     "SPEECH OUTPUT: 'ligula. Proin porta rutrum lacus. Etiam consequat scelerisque'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Down Arrow", 
+    ["BRAILLE LINE:  'quam. Nulla facilisi. Maecenas luctus venenatis nulla. In sit amet'",
+     "     VISIBLE:  'quam. Nulla facilisi. Maecenas l', cursor=1",
+     "SPEECH OUTPUT: 'quam. Nulla facilisi. Maecenas luctus venenatis nulla. In sit amet'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Down Arrow", 
+    ["BRAILLE LINE:  'dui non mi semper iaculis. Sed molestie tortor at ipsum. Morbi'",
+     "     VISIBLE:  'dui non mi semper iaculis. Sed m', cursor=1",
+     "SPEECH OUTPUT: 'dui non mi semper iaculis. Sed molestie tortor at ipsum. Morbi'"]))
+
+########################################################################
+# Up Arrow through the panel text back to the page tab.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Up Arrow", 
+    ["BRAILLE LINE:  'quam. Nulla facilisi. Maecenas luctus venenatis nulla. In sit amet'",
+     "     VISIBLE:  'quam. Nulla facilisi. Maecenas l', cursor=1",
+     "SPEECH OUTPUT: 'quam. Nulla facilisi. Maecenas luctus venenatis nulla. In sit amet'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Up Arrow", 
+    ["BRAILLE LINE:  'ligula. Proin porta rutrum lacus. Etiam consequat scelerisque'",
+     "     VISIBLE:  'ligula. Proin porta rutrum lacus', cursor=1",
+     "SPEECH OUTPUT: 'ligula. Proin porta rutrum lacus. Etiam consequat scelerisque'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Up Arrow", 
+    ["BRAILLE LINE:  'Aenean semper sagittis velit. Cras in mi. Duis porta mauris ut'",
+     "     VISIBLE:  'Aenean semper sagittis velit. Cr', cursor=1",
+     "SPEECH OUTPUT: 'Aenean semper sagittis velit. Cras in mi. Duis porta mauris ut'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Up Arrow", 
+    ["BRAILLE LINE:  'Make it overflow. ipsum dolor sit amet, consectetuer adipiscing elit.'",
+     "     VISIBLE:  'Make it overflow. ipsum dolor si', cursor=1",
+     "SPEECH OUTPUT: 'Make it overflow. ipsum dolor sit amet link , consectetuer adipiscing elit.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Up Arrow", 
+    ["BRAILLE LINE:  'This is the second tab.'",
+     "     VISIBLE:  'This is the second tab.', cursor=1",
+     "SPEECH OUTPUT: 'This is the second tab.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Up Arrow", 
+    ["BRAILLE LINE:  'First tab Page Image Second tab Page Image'",
+     "     VISIBLE:  'First tab Page Image Second tab ', cursor=1",
+     "SPEECH OUTPUT: 'First tab page Second tab page'"]))
+
+########################################################################
+# Escape to dismiss the dialog.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Escape"))
+sequence.append(utils.AssertPresentationAction(
+    "Escape to dismiss the dialog", 
+    ["BRAILLE LINE:  'Show TabContainer Dialog Button'",
+     "     VISIBLE:  'Show TabContainer Dialog Button', cursor=1",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Show TabContainer Dialog button'"]))
+
+########################################################################
+# Close the demo
+#
+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]