summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib
diff options
context:
space:
mode:
authordtu@google.com <dtu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 19:27:29 +0000
committerdtu@google.com <dtu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 19:27:29 +0000
commit29d35015b5204f6a5467067ed2e7ca63fe7a7349 (patch)
treec81326c6b410f72b99dfcbac755a45184a87c9e1 /chrome/test/pyautolib
parentf6e71f2c1dc8a2a6584bdd2762ae927bbe0bc029 (diff)
downloadchromium_src-29d35015b5204f6a5467067ed2e7ca63fe7a7349.zip
chromium_src-29d35015b5204f6a5467067ed2e7ca63fe7a7349.tar.gz
chromium_src-29d35015b5204f6a5467067ed2e7ca63fe7a7349.tar.bz2
Currently, the PyAuto hook UnlockScreen() hangs when the test attempts to use a bad password. Instead, it should return an error string.
BUG=crosbug.com/15082 TEST=python chromeos_login.py chromeos_login.ChromeosLogin.testLockAndUnlockScreenAfterLoginWithBadPassword Review URL: http://codereview.chromium.org/7074027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87341 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rw-r--r--chrome/test/pyautolib/pyauto.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index a3ce6e0..f21e523 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -2849,6 +2849,10 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
Waits until screen is unlocked.
Screen locker should be active for this to work.
+ Returns:
+ An error string if an error occured.
+ None otherwise.
+
Raises:
pyauto_errors.JSONInterfaceError if the automation call returns an error.
"""
@@ -2856,7 +2860,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
'command': 'UnlockScreen',
'password': password,
}
- self._GetResultFromJSONRequest(cmd_dict, windex=-1)
+ result = self._GetResultFromJSONRequest(cmd_dict, windex=-1)
+ return result.get('error_string')
def SignoutInScreenLocker(self):
"""Signs out of chromeos using the screen locker's "Sign out" feature.