summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authordtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 00:55:55 +0000
committerdtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-08 00:55:55 +0000
commit093ba7d3ff40ee18c4b4d6725227f107e022c21a (patch)
treea802c00035730b1e4264b5a57ef21812e670ad15 /chrome/test
parent10dd9b913f37bd56e7b645be4ae922da4c22e30e (diff)
downloadchromium_src-093ba7d3ff40ee18c4b4d6725227f107e022c21a.zip
chromium_src-093ba7d3ff40ee18c4b4d6725227f107e022c21a.tar.gz
chromium_src-093ba7d3ff40ee18c4b4d6725227f107e022c21a.tar.bz2
Make PyAuto EnrollEnterpriseDevice() return False instead of raising an Exception.
BUG=chromium-os:19970 TEST=Make sure Chrome builds. There are no tests that use this automation yet. (They are coming.) Review URL: http://codereview.chromium.org/7839016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/pyautolib/pyauto.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 895985a..0ba95c5 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -3674,8 +3674,12 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
equivalent to pressing Ctrl-Alt-e to enroll the device from the login
screen.
+ Returns:
+ An error string if the enrollment fails.
+ None otherwise.
+
Raises:
- pyauto_errors.JSONInterfaceError if the enrollment fails.
+ pyauto_errors.JSONInterfaceError if the automation call returns an error.
"""
cmd_dict = {
'command': 'EnrollEnterpriseDevice',
@@ -3683,7 +3687,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
'password': password,
}
time.sleep(5) # TODO(craigdh): Block until Install Attributes is ready.
- return self._GetResultFromJSONRequest(cmd_dict, windex=-1)
+ result = self._GetResultFromJSONRequest(cmd_dict, windex=-1)
+ return result.get('error_string')
def GetUpdateInfo(self):
"""Gets the status of the ChromeOS updater.