Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 10944014: Fix to enable the cached credentials login test (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Confirmed cached login fails with bad password, reparented User Pod class to PyUI Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 010595d947d2262b8b5cb2b2390e0e81f5fa72d1..8d644f32a8c4b600e990092f7370cd61a8e2ec92 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -4602,7 +4602,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
'Chrome did not reopen the testing channel after login as guest.'
self.SetUp()
- def Login(self, username, password):
+ def Login(self, username, password, use_cached_credentials=False):
"""Login to chromeos.
Waits until logged in and browser is ready.
@@ -4612,6 +4612,11 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
will not be noticed here, because the browser has no knowledge of it. In
this case the GetNextEvent automation command will always time out.
+ Args:
+ username, password: User credentials for login.
+ use_cached_credentials: Should we login with cached credentials or
+ resubmit credentials and wait for validation?
+
Returns:
An error string if an error occured.
None otherwise.
@@ -4625,12 +4630,11 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
'command': 'SubmitLoginForm',
'username': username,
'password': password,
+ 'use_cached_credentials': use_cached_credentials,
}
self._GetResultFromJSONRequest(cmd_dict, windex=None)
self.AddDomEventObserver('loginfail', automation_id=4444)
try:
- # TODO(craigdh): Add login failure events once PyAuto switches to mocked
- # GAIA authentication.
if self.GetNextEvent().get('name') == 'loginfail':
raise JSONInterfaceError('Login denied by auth server.')
except JSONInterfaceError as e:
« no previous file with comments | « chrome/test/functional/chromeos_login.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698