[orca] New test cases



commit 035ce538aad8729f367c54dd1dbb259edacf43c2
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Aug 25 03:30:41 2014 -0400

    New test cases

 test/html/hidden.html                              |   25 ++++
 test/keystrokes/firefox/aria_landmarks.py          |   10 +-
 .../html_struct_nav_hidden_paragraphs.params       |    1 +
 .../firefox/html_struct_nav_hidden_paragraphs.py   |  119 ++++++++++++++++++++
 .../firefox/line_nav_hidden_elements.params        |    1 +
 .../keystrokes/firefox/line_nav_hidden_elements.py |  119 ++++++++++++++++++++
 6 files changed, 270 insertions(+), 5 deletions(-)
---
diff --git a/test/html/hidden.html b/test/html/hidden.html
new file mode 100644
index 0000000..4c71972
--- /dev/null
+++ b/test/html/hidden.html
@@ -0,0 +1,25 @@
+<html>
+<body>
+<p>This element is not hidden.</p>
+<p aria-hidden="true">This element hidden by ARIA.</p>
+<p hidden>This element hidden by HTML5 hidden.</p>
+<p style="display:none">This element hidden by display:none.</p>
+<p style="position:absolute;left:-9999px">This element hidden by position off screen.</p>
+<div>
+    <p>This element is in a parent which is not hidden.</p>
+</div>
+<div aria-hidden="true">
+   <p>This element is in a parent hidden by ARIA.</p>
+</div>
+<div hidden>
+    <p hidden>This element is in a parent hidden by HTML5 hidden.</p>
+</div>
+<div style="display:none">
+    <p>This element is in a parent hidden by display:none.</p>
+</div>
+<div style="position:absolute;left:-9999px">
+    <p>This element is in a parent hidden by position off screen</p>
+</div>
+<p>This element is not hidden.</p>
+</body>
+</html>
diff --git a/test/keystrokes/firefox/aria_landmarks.py b/test/keystrokes/firefox/aria_landmarks.py
index dd9bda6..94c0dbb 100644
--- a/test/keystrokes/firefox/aria_landmarks.py
+++ b/test/keystrokes/firefox/aria_landmarks.py
@@ -77,7 +77,7 @@ sequence.append(utils.AssertPresentationAction(
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>m"))
 sequence.append(utils.AssertPresentationAction(
-    "8. m to previous landmark",
+    "8. Shift+m to previous landmark",
     ["BRAILLE LINE:  'Wrapping to bottom.'",
      "     VISIBLE:  'Wrapping to bottom.', cursor=0",
      "BRAILLE LINE:  'contentinfo'",
@@ -88,7 +88,7 @@ sequence.append(utils.AssertPresentationAction(
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>m"))
 sequence.append(utils.AssertPresentationAction(
-    "9. m to previous landmark",
+    "9. Shift+m to previous landmark",
     ["BRAILLE LINE:  'search'",
      "     VISIBLE:  'search', cursor=1",
      "SPEECH OUTPUT: 'search'"]))
@@ -96,7 +96,7 @@ sequence.append(utils.AssertPresentationAction(
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>m"))
 sequence.append(utils.AssertPresentationAction(
-    "10. m to previous landmark",
+    "10. Shift+m to previous landmark",
     ["KNOWN ISSUE: We are skipping over complementary on the way back",
      "BRAILLE LINE:  'application'",
      "     VISIBLE:  'application', cursor=1",
@@ -106,7 +106,7 @@ sequence.append(utils.AssertPresentationAction(
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>m"))
 sequence.append(utils.AssertPresentationAction(
-    "11. m to previous landmark",
+    "11. Shift+m to previous landmark",
     ["KNOWN ISSUE: We are skipping over navigation on the way back",
      "BRAILLE LINE:  'navigation main complementary'",
      "     VISIBLE:  'navigation main complementary', cursor=1",
@@ -115,7 +115,7 @@ sequence.append(utils.AssertPresentationAction(
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyComboAction("<Shift>m"))
 sequence.append(utils.AssertPresentationAction(
-    "12. m to previous landmark",
+    "12. Shift+m to previous landmark",
     ["BRAILLE LINE:  'banner'",
      "     VISIBLE:  'banner', cursor=1",
      "SPEECH OUTPUT: 'banner'"]))
diff --git a/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.params 
b/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.params
new file mode 100644
index 0000000..cf441c9
--- /dev/null
+++ b/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.params
@@ -0,0 +1 @@
+PARAMS=$TEST_DIR/../../html/hidden.html
diff --git a/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.py 
b/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.py
new file mode 100644
index 0000000..0bdd17c
--- /dev/null
+++ b/test/keystrokes/firefox/html_struct_nav_hidden_paragraphs.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+"""Test of structural navigation by paragraph with some paragraphs hidden."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Top of file",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "2. p to next paragraph",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element hidden by ARIA.'",
+     "     VISIBLE:  'This element hidden by ARIA.', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "3. p to next paragraph",
+    ["BRAILLE LINE:  'This element hidden by position off screen.'",
+     "     VISIBLE:  'This element hidden by position ', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by position off screen.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "4. p to next paragraph",
+    ["BRAILLE LINE:  'This element is in a parent which is not hidden.'",
+     "     VISIBLE:  'This element is in a parent whic', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent which is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "5. p to next paragraph",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element is in a parent hidden by ARIA.'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "6. p to next paragraph",
+    ["BRAILLE LINE:  'This element is in a parent hidden by position off screen'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by position off screen'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("p"))
+sequence.append(utils.AssertPresentationAction(
+    "7. p to next paragraph",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "8. Shift p to previous paragraph",
+    ["BRAILLE LINE:  'This element is in a parent hidden by position off screen'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by position off screen'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "9. Shift p to previous paragraph",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element is in a parent hidden by ARIA.'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "10. Shift p to previous paragraph",
+    ["BRAILLE LINE:  'This element is in a parent which is not hidden.'",
+     "     VISIBLE:  'This element is in a parent whic', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent which is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "11. Shift p to previous paragraph",
+    ["BRAILLE LINE:  'This element hidden by position off screen.'",
+     "     VISIBLE:  'This element hidden by position ', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by position off screen.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "12. Shift p to previous paragraph",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element hidden by ARIA.'",
+     "     VISIBLE:  'This element hidden by ARIA.', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Shift>p"))
+sequence.append(utils.AssertPresentationAction(
+    "13. Shift p to previous paragraph",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.AssertionSummaryAction())
+sequence.start()
diff --git a/test/keystrokes/firefox/line_nav_hidden_elements.params 
b/test/keystrokes/firefox/line_nav_hidden_elements.params
new file mode 100644
index 0000000..cf441c9
--- /dev/null
+++ b/test/keystrokes/firefox/line_nav_hidden_elements.params
@@ -0,0 +1 @@
+PARAMS=$TEST_DIR/../../html/hidden.html
diff --git a/test/keystrokes/firefox/line_nav_hidden_elements.py 
b/test/keystrokes/firefox/line_nav_hidden_elements.py
new file mode 100644
index 0000000..cc9e086
--- /dev/null
+++ b/test/keystrokes/firefox/line_nav_hidden_elements.py
@@ -0,0 +1,119 @@
+#!/usr/bin/python
+
+"""Test of line navigation output of Firefox."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Top of file",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Line Down",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element hidden by ARIA.'",
+     "     VISIBLE:  'This element hidden by ARIA.', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Line Down",
+    ["BRAILLE LINE:  'This element hidden by position off screen.'",
+     "     VISIBLE:  'This element hidden by position ', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by position off screen.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Line Down",
+    ["BRAILLE LINE:  'This element is in a parent which is not hidden.'",
+     "     VISIBLE:  'This element is in a parent whic', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent which is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Line Down",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element is in a parent hidden by ARIA.'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "6. Line Down",
+    ["BRAILLE LINE:  'This element is in a parent hidden by position off screen'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by position off screen'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "7. Line Down",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "8. Line Up",
+    ["BRAILLE LINE:  'This element is in a parent hidden by position off screen'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by position off screen'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "9. Line Up",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element is in a parent hidden by ARIA.'",
+     "     VISIBLE:  'This element is in a parent hidd', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "10. Line Up",
+    ["BRAILLE LINE:  'This element is in a parent which is not hidden.'",
+     "     VISIBLE:  'This element is in a parent whic', cursor=1",
+     "SPEECH OUTPUT: 'This element is in a parent which is not hidden.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "11. Line Up",
+    ["BRAILLE LINE:  'This element hidden by position off screen.'",
+     "     VISIBLE:  'This element hidden by position ', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by position off screen.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "12. Line Up",
+    ["KNOWN ISSUE: Orca should not present this",
+     "BRAILLE LINE:  'This element hidden by ARIA.'",
+     "     VISIBLE:  'This element hidden by ARIA.', cursor=1",
+     "SPEECH OUTPUT: 'This element hidden by ARIA.'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "13. Line Up",
+    ["BRAILLE LINE:  'This element is not hidden.'",
+     "     VISIBLE:  'This element is not hidden.', cursor=1",
+     "SPEECH OUTPUT: 'This element is not hidden.'"]))
+
+sequence.append(utils.AssertionSummaryAction())
+sequence.start()


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