[orca] Use *.params files for tests



commit 1a2ceab45f6f3c526d41bf8f6fef6f79fd8f588e
Author: Willie Walker <william walker sun com>
Date:   Fri Jun 12 13:25:20 2009 -0400

    Use *.params files for tests
    
    Use params files instead of changing the Orca preferencs on the
    fly.  Changing them on the fly disrupts the DBus communication
    and can hang the test harness.

 test/keystrokes/firefox/line_nav_bug_577239.py     |   34 ------------------
 .../firefox/line_nav_bug_577239.settings           |   36 ++++++++++++++++++++
 test/keystrokes/firefox/line_nav_bug_577979.py     |   34 ------------------
 .../firefox/line_nav_bug_577979.settings           |   36 ++++++++++++++++++++
 4 files changed, 72 insertions(+), 68 deletions(-)
---
diff --git a/test/keystrokes/firefox/line_nav_bug_577239.py b/test/keystrokes/firefox/line_nav_bug_577239.py
index 16e2c0f..bd9130d 100644
--- a/test/keystrokes/firefox/line_nav_bug_577239.py
+++ b/test/keystrokes/firefox/line_nav_bug_577239.py
@@ -29,23 +29,6 @@ sequence.append(WaitForFocus("",
                              acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Set Gecko's arrowToLineBeginning setting to False
-#
-sequence.append(KeyPressAction(0, None, "KP_Insert"))
-sequence.append(KeyComboAction("<Control>space"))
-sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
-sequence.append(WaitForWindowActivate("Orca Preferences for Firefox",None))
-sequence.append(WaitForFocus("Speech", acc_role=pyatspi.ROLE_PAGE_TAB))
-sequence.append(KeyComboAction("End"))
-sequence.append(PauseAction(3000))
-sequence.append(KeyComboAction("<Alt>p"))
-sequence.append(WaitForFocus("Position cursor at start of line when navigating vertically", acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("<Alt>o"))
-sequence.append(PauseAction(1000))
-sequence.append(TypeAction(" "))
-sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
-
-########################################################################
 # Press Control+Home to move to the top.
 #
 sequence.append(utils.StartRecordingAction())
@@ -191,23 +174,6 @@ sequence.append(utils.AssertPresentationAction(
      "SPEECH OUTPUT: 'this is a page to test how well Orca works with list items.'"]))
 
 ########################################################################
-# Set Gecko's arrowToLineBeginning setting back to True
-#
-sequence.append(KeyPressAction(0, None, "KP_Insert"))
-sequence.append(KeyComboAction("<Control>space"))
-sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
-sequence.append(WaitForWindowActivate("Orca Preferences for Firefox",None))
-sequence.append(WaitForFocus("Speech", acc_role=pyatspi.ROLE_PAGE_TAB))
-sequence.append(KeyComboAction("End"))
-sequence.append(PauseAction(3000))
-sequence.append(KeyComboAction("<Alt>p"))
-sequence.append(WaitForFocus("Position cursor at start of line when navigating vertically", acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("<Alt>o"))
-sequence.append(PauseAction(1000))
-sequence.append(TypeAction(" "))
-sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
-
-########################################################################
 # 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.
diff --git a/test/keystrokes/firefox/line_nav_bug_577239.settings b/test/keystrokes/firefox/line_nav_bug_577239.settings
new file mode 100644
index 0000000..431cb74
--- /dev/null
+++ b/test/keystrokes/firefox/line_nav_bug_577239.settings
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+# Default settings for all tests.  These can be overridden by
+# defining a *.params file for a test.  See 
+# http://live.gnome.org/Orca/RegressionTesting for more info.
+
+import re
+
+import orca.debug
+import orca.settings
+
+# This file should be identical to ../../harness/user-settings.py except
+# for the following two lines of executable code:
+#
+import orca.scripts.toolkits.Gecko.script_settings
+orca.scripts.toolkits.Gecko.script_settings.arrowToLineBeginning = False
+
+orca.settings.enableEchoByWord = False
+orca.settings.enableKeyEcho = False
+orca.settings.enablePrintableKeys = False
+orca.settings.enableModifierKeys = False
+orca.settings.enableLockingKeys = False
+orca.settings.enableFunctionKeys = False
+orca.settings.enableActionKeys = False
+
+orca.settings.enableBraille = False
+orca.settings.enableBrailleMonitor = False
+
+import orca.orca_state
+try:
+    reload(orca.orca_state.orcaCustomizations)
+except AttributeError:
+    try:
+        orca.orca_state.orcaCustomizations = __import__("orca-customizations")
+    except ImportError:
+        pass
diff --git a/test/keystrokes/firefox/line_nav_bug_577979.py b/test/keystrokes/firefox/line_nav_bug_577979.py
index 5e9bb9b..ef94cef 100644
--- a/test/keystrokes/firefox/line_nav_bug_577979.py
+++ b/test/keystrokes/firefox/line_nav_bug_577979.py
@@ -29,23 +29,6 @@ sequence.append(WaitForFocus("",
                              acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
 
 ########################################################################
-# Set Gecko's arrowToLineBeginning setting to False
-#
-sequence.append(KeyPressAction(0, None, "KP_Insert"))
-sequence.append(KeyComboAction("<Control>space"))
-sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
-sequence.append(WaitForWindowActivate("Orca Preferences for Firefox",None))
-sequence.append(WaitForFocus("Speech", acc_role=pyatspi.ROLE_PAGE_TAB))
-sequence.append(KeyComboAction("End"))
-sequence.append(PauseAction(3000))
-sequence.append(KeyComboAction("<Alt>p"))
-sequence.append(WaitForFocus("Position cursor at start of line when navigating vertically", acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("<Alt>o"))
-sequence.append(PauseAction(1000))
-sequence.append(TypeAction(" "))
-sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
-
-########################################################################
 # Press Control+Home to move to the top.
 #
 sequence.append(utils.StartRecordingAction())
@@ -138,23 +121,6 @@ sequence.append(utils.AssertPresentationAction(
      "SPEECH OUTPUT: 'This is an example of an unordered list:'"]))
 
 ########################################################################
-# Set Gecko's arrowToLineBeginning setting back to True
-#
-sequence.append(KeyPressAction(0, None, "KP_Insert"))
-sequence.append(KeyComboAction("<Control>space"))
-sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
-sequence.append(WaitForWindowActivate("Orca Preferences for Firefox",None))
-sequence.append(WaitForFocus("Speech", acc_role=pyatspi.ROLE_PAGE_TAB))
-sequence.append(KeyComboAction("End"))
-sequence.append(PauseAction(3000))
-sequence.append(KeyComboAction("<Alt>p"))
-sequence.append(WaitForFocus("Position cursor at start of line when navigating vertically", acc_role=pyatspi.ROLE_CHECK_BOX))
-sequence.append(KeyComboAction("<Alt>o"))
-sequence.append(PauseAction(1000))
-sequence.append(TypeAction(" "))
-sequence.append(WaitForWindowActivate(utils.firefoxFrameNames, None))
-
-########################################################################
 # 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.
diff --git a/test/keystrokes/firefox/line_nav_bug_577979.settings b/test/keystrokes/firefox/line_nav_bug_577979.settings
new file mode 100644
index 0000000..431cb74
--- /dev/null
+++ b/test/keystrokes/firefox/line_nav_bug_577979.settings
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+
+# Default settings for all tests.  These can be overridden by
+# defining a *.params file for a test.  See 
+# http://live.gnome.org/Orca/RegressionTesting for more info.
+
+import re
+
+import orca.debug
+import orca.settings
+
+# This file should be identical to ../../harness/user-settings.py except
+# for the following two lines of executable code:
+#
+import orca.scripts.toolkits.Gecko.script_settings
+orca.scripts.toolkits.Gecko.script_settings.arrowToLineBeginning = False
+
+orca.settings.enableEchoByWord = False
+orca.settings.enableKeyEcho = False
+orca.settings.enablePrintableKeys = False
+orca.settings.enableModifierKeys = False
+orca.settings.enableLockingKeys = False
+orca.settings.enableFunctionKeys = False
+orca.settings.enableActionKeys = False
+
+orca.settings.enableBraille = False
+orca.settings.enableBrailleMonitor = False
+
+import orca.orca_state
+try:
+    reload(orca.orca_state.orcaCustomizations)
+except AttributeError:
+    try:
+        orca.orca_state.orcaCustomizations = __import__("orca-customizations")
+    except ImportError:
+        pass



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