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



Author: joanied
Date: Wed Nov  5 22:59:45 2008
New Revision: 4322
URL: http://svn.gnome.org/viewvc/orca?rev=4322&view=rev

Log:
* test/keystrokes/firefox/line_nav_bug_554616.py: (new)
  test/keystrokes/firefox/bug_544771.py: (new)
  test/keystrokes/firefox/html_struct_nav_bug_556470.py: (new)
  test/html/bug-554616.html: (new)
  test/html/bug-556470.html: (new)
  test/html/bug-544771.html: (new)
  New regression tests.



Added:
   trunk/test/html/bug-544771.html
   trunk/test/html/bug-554616.html
   trunk/test/html/bug-556470.html
   trunk/test/keystrokes/firefox/bug_544771.py
   trunk/test/keystrokes/firefox/html_struct_nav_bug_556470.py
   trunk/test/keystrokes/firefox/line_nav_bug_554616.py
Modified:
   trunk/ChangeLog

Added: trunk/test/html/bug-544771.html
==============================================================================
--- (empty file)
+++ trunk/test/html/bug-544771.html	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,23 @@
+<html>
+<head>
+<title>Link test</title>
+</head>
+<body>
+<h1>Contents</h1>
+<ul>
+<li><a href="#one">First item</a></li>
+<li><a href="#two">Second item</a></li>
+<li><a href="#three">Third item</a></li>
+</ul>
+<p>This is a test.</p>
+<a id="one"></a>
+<h2>First</h2>
+The Orca or Killer Whale (Orcinus orca), less commonly, Blackfish or Seawolf, is the largest species of the oceanic dolphin family. It is found in all the world's oceans, from the frigid Arctic and Antarctic regions to warm, tropical seas.
+<a id="two"></a>
+<h2>Second</h2>
+Orca are versatile and opportunistic predators. Some populations feed mostly on fish, and other populations hunt marine mammals, including sea lions, seals, walruses and even large whales. There are up to five distinct Orca types, some of which may be separate races, subspecies or even species. Orcas are highly social; some populations are composed of matrilineal family groups, which are the most stable of any animal species.[1] The sophisticated social behaviour, hunting techniques, and vocal behaviour of Orcas have been described as manifestations of culture.[2]
+<a id="three"></a>
+<h2>Third</h2>
+Although Orcas are not an endangered species, some local populations are considered threatened or endangered due to pollution, depletion of prey species, conflicts with fishing activities and vessels, habitat loss, and whaling. Wild Orcas are usually not considered a threat to humans.[3] There have, however, been isolated reports of captive orcas attacking their handlers at marine theme parks.[4]
+</body>
+</html>

Added: trunk/test/html/bug-554616.html
==============================================================================
--- (empty file)
+++ trunk/test/html/bug-554616.html	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>Test</title>
+</head>
+<body>
+<table>
+<tbody><tr><th>Snapshot version</th><th>Date (UTC)</th><th>Download</th></tr>
+<tr><td>r2477</td><td>Wed Nov  5 16:39:00 2008</td><td><a href="foo1">installer</a> (10190 KB)<br><a href="bar1">portable archive</a> (9154 KB)</td></tr>
+<tr><td>r2468</td><td>Tue Nov  4 16:39:02 2008</td><td><a href="foo2">installer</a> (10193 KB)<br><a href="bar2">portable archive</a> (9149 KB)</td></tr>
+<tr><td>r2464</td><td>Mon Nov  3 16:39:48 2008</td><td><a href="for3">installer</a> (10186 KB)<br><a href="bar3">portable archive</a> (9146 KB)</td></tr>
+</tbody></table>
+</body>
+</html>

Added: trunk/test/html/bug-556470.html
==============================================================================
--- (empty file)
+++ trunk/test/html/bug-556470.html	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,21 @@
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+<title>a test for bug 556470</title>
+</head><body>
+<p>hi, this is a paragraph</p>
+<table>
+<tbody><tr><th>col 1</th><th>col 2</th><th>col 3</th></tr>
+<tr><td>a</td><td>b</td><td>c</td></tr>
+</tbody></table>
+
+<p>here follows an empty table</p>
+<table> </table>
+
+<p>here follows a normal table again</p>
+<table>
+<tbody><tr><td>1</td><td>2</td><td>4</td></tr>
+<tr><td>2</td><td>4</td><td>16</td></tr>
+</tbody></table>
+<p>end of test page</p>
+</body></html>
\ No newline at end of file

Added: trunk/test/keystrokes/firefox/bug_544771.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/bug_544771.py	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,99 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of navigation to same page links.
+"""
+
+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 + "bug-544771.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+sequence.append(PauseAction(3000))
+
+########################################################################
+# 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:  'Contents h1'",
+     "     VISIBLE:  'Contents h1', cursor=1",
+     "SPEECH OUTPUT: 'Contents heading level 1'"]))
+
+########################################################################
+# Press Tab twice to move to the Second link. Then press Return. Down
+# Arrow to verify we've updated our position.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Tab", 
+    ["BRAILLE LINE:  'â First item'",
+     "     VISIBLE:  'â First item', cursor=3",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'First item link'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Tab"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Tab", 
+    ["BRAILLE LINE:  'â Second item'",
+     "     VISIBLE:  'â Second item', cursor=3",
+     "SPEECH OUTPUT: ''",
+     "SPEECH OUTPUT: 'Second item link'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Return"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Return", 
+    ["BRAILLE LINE:  ''",
+     "     VISIBLE:  '', cursor=1"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Down", 
+    ["BRAILLE LINE:  'Second h2'",
+     "     VISIBLE:  'Second h2', cursor=1",
+     "SPEECH OUTPUT: 'Second heading level 2'"]))
+
+########################################################################
+# 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.append(utils.AssertionSummaryAction())
+
+sequence.start()

Added: trunk/test/keystrokes/firefox/html_struct_nav_bug_556470.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/html_struct_nav_bug_556470.py	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,125 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of table structural navigation with empty tables.
+"""
+
+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 + "bug-556470.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+sequence.append(PauseAction(3000))
+
+########################################################################
+# 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:  'hi, this is a paragraph'",
+     "     VISIBLE:  'hi, this is a paragraph', cursor=1",
+     "SPEECH OUTPUT: 'hi, this is a paragraph'"]))
+
+########################################################################
+# Press t to move amongst the tables
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("t"))
+sequence.append(utils.AssertPresentationAction(
+    "1. t", 
+    ["BRAILLE LINE:  'col 1 col 2 col 3'",
+     "     VISIBLE:  'col 1 col 2 col 3', cursor=1",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: 'col 1'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("t"))
+sequence.append(utils.AssertPresentationAction(
+    "2. t", 
+    ["BRAILLE LINE:  '1 2 4'",
+     "     VISIBLE:  '1 2 4', cursor=1",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: '1'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("t"))
+sequence.append(utils.AssertPresentationAction(
+    "3. t", 
+    ["BRAILLE LINE:  'col 1 col 2 col 3'",
+     "     VISIBLE:  'col 1 col 2 col 3', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to top.'",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: 'col 1'"]))
+
+########################################################################
+# Press Shift+t to move amongst the tables
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>t"))
+sequence.append(utils.AssertPresentationAction(
+    "1. shift+t", 
+    ["BRAILLE LINE:  '1 2 4'",
+     "     VISIBLE:  '1 2 4', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to bottom.'",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: '1'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>t"))
+sequence.append(utils.AssertPresentationAction(
+    "2. shift+t", 
+    ["BRAILLE LINE:  'col 1 col 2 col 3'",
+     "     VISIBLE:  'col 1 col 2 col 3', cursor=1",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: 'col 1'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>t"))
+sequence.append(utils.AssertPresentationAction(
+    "3. shift+t", 
+    ["BRAILLE LINE:  '1 2 4'",
+     "     VISIBLE:  '1 2 4', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to bottom.'",
+     "SPEECH OUTPUT: 'Table with 2 rows 3 columns'",
+     "SPEECH OUTPUT: '1'"]))
+
+########################################################################
+# 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.append(utils.AssertionSummaryAction())
+
+sequence.start()

Added: trunk/test/keystrokes/firefox/line_nav_bug_554616.py
==============================================================================
--- (empty file)
+++ trunk/test/keystrokes/firefox/line_nav_bug_554616.py	Wed Nov  5 22:59:45 2008
@@ -0,0 +1,169 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of line 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("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-554616.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(
+    "Top of file",
+    ["BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "SPEECH OUTPUT: 'Snapshot version Date (UTC) Download'"]))
+
+########################################################################
+# Down Arrow.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Line Down",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'r2477 Wed Nov 5 16:39:00 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2477 Wed Nov 5 16:39:00 2008 installer link  (10190 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Line Down",
+    ["BRAILLE LINE:  'portable archive (9154 KB)'",
+     "     VISIBLE:  'portable archive (9154 KB)', cursor=1",
+     "SPEECH OUTPUT: 'portable archive link  (9154 KB)'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Line Down",
+    ["BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'r2468 Tue Nov 4 16:39:02 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2468 Tue Nov 4 16:39:02 2008 installer link  (10193 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Line Down",
+    ["BRAILLE LINE:  'portable archive (9149 KB)'",
+     "     VISIBLE:  'portable archive (9149 KB)', cursor=1",
+     "SPEECH OUTPUT: 'portable archive link  (9149 KB)'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Line Down",
+    ["BRAILLE LINE:  'r2464 Mon Nov 3 16:39:48 2008 installer (10186 KB)'",
+     "     VISIBLE:  'r2464 Mon Nov 3 16:39:48 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2464 Mon Nov 3 16:39:48 2008 installer link  (10186 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Line Down",
+    ["BRAILLE LINE:  'portable archive (9146 KB)'",
+     "     VISIBLE:  'portable archive (9146 KB)', cursor=1",
+     "SPEECH OUTPUT: 'portable archive link  (9146 KB)'"]))
+
+########################################################################
+# Up Arrow.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Line Up",
+    ["BRAILLE LINE:  'r2464 Mon Nov 3 16:39:48 2008 installer (10186 KB)'",
+     "     VISIBLE:  'r2464 Mon Nov 3 16:39:48 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2464 Mon Nov 3 16:39:48 2008 installer link  (10186 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Line Up",
+    ["BRAILLE LINE:  'portable archive (9149 KB)'",
+     "     VISIBLE:  'portable archive (9149 KB)', cursor=1",
+     "SPEECH OUTPUT: 'portable archive link  (9149 KB)'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Line Up",
+    ["BRAILLE LINE:  'r2468 Tue Nov 4 16:39:02 2008 installer (10193 KB)'",
+     "     VISIBLE:  'r2468 Tue Nov 4 16:39:02 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2468 Tue Nov 4 16:39:02 2008 installer link  (10193 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Line Up",
+    ["BRAILLE LINE:  'portable archive (9154 KB)'",
+     "     VISIBLE:  'portable archive (9154 KB)', cursor=1",
+     "SPEECH OUTPUT: 'portable archive link  (9154 KB)'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Line Up",
+    ["BRAILLE LINE:  'r2477 Wed Nov 5 16:39:00 2008 installer (10190 KB)'",
+     "     VISIBLE:  'r2477 Wed Nov 5 16:39:00 2008 in', cursor=1",
+     "SPEECH OUTPUT: 'r2477 Wed Nov 5 16:39:00 2008 installer link  (10190 KB)",
+     "'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Line Up",
+    ["BRAILLE LINE:  'Snapshot version Date (UTC) Download'",
+     "     VISIBLE:  'Snapshot version Date (UTC) Down', cursor=1",
+     "SPEECH OUTPUT: 'Snapshot version Date (UTC) Download'"]))
+
+########################################################################
+# 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.append(utils.AssertionSummaryAction())
+
+sequence.start()



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