diff options
author | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 21:56:31 +0000 |
---|---|---|
committer | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 21:56:31 +0000 |
commit | 954de8fed2ce9bd897dcb991e1527407e74a8494 (patch) | |
tree | 6b541ccec1b8c5ab1f66b099fc19ab56f3b645c4 /chrome/test/pyautolib | |
parent | 05a0f6fb39a111d3f9aa373a8ada5db91aa835eb (diff) | |
download | chromium_src-954de8fed2ce9bd897dcb991e1527407e74a8494.zip chromium_src-954de8fed2ce9bd897dcb991e1527407e74a8494.tar.gz chromium_src-954de8fed2ce9bd897dcb991e1527407e74a8494.tar.bz2 |
New EnableAccessibility() and IsAccessibilityEnabled() automation hooks for PyAuto testing.
Change-Id: I3e226418b57a2cada71d9494e004747d6c55a7cc
BUG=chromium-os:25588
TEST=Manually verified that accessibility is enabled both on the login screen and once logged in. Looked in the Settings panel to ensure High Contrast, Screen Magnifier, and Virtual Keyboard settings were enabled.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120841
Review URL: http://codereview.chromium.org/9232058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rwxr-xr-x | chrome/test/pyautolib/pyauto.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 83e2574..ca7f25b 100755 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -4247,6 +4247,34 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): cmd_dict = { 'command': 'GetEnterprisePolicyInfo' } return self._GetResultFromJSONRequest(cmd_dict, windex=None) + def EnableSpokenFeedback(self, enabled): + """Enables or disables spoken feedback accessibility mode. + + Args: + enabled: Boolean value indicating the desired state of spoken feedback. + + Raises: + pyauto_errors.JSONInterfaceError if the automation call returns an error. + """ + cmd_dict = { + 'command': 'EnableSpokenFeedback', + 'enabled': enabled, + } + return self._GetResultFromJSONRequest(cmd_dict, windex=None) + + def IsSpokenFeedbackEnabled(self): + """Check whether spoken feedback accessibility mode is enabled. + + Returns: + True if spoken feedback is enabled, False otherwise. + + Raises: + pyauto_errors.JSONInterfaceError if the automation call returns an error. + """ + cmd_dict = { 'command': 'IsSpokenFeedbackEnabled', } + result = self._GetResultFromJSONRequest(cmd_dict, windex=None) + return result.get('spoken_feedback') + def GetTimeInfo(self, windex=0): """Gets info about the ChromeOS status bar clock. |