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

Side by Side Diff: chrome/test/pyautolib/chromeos/chromeos_utils.py

Issue 10836187: [chromeos] pyauto tests should auto login by default on chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/netflix.py ('k') | chrome/test/pyautolib/policy_base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import sys 8 import sys
9 9
10 10
(...skipping 10 matching lines...) Expand all
21 class ChromeosUtils(pyauto.PyUITest): 21 class ChromeosUtils(pyauto.PyUITest):
22 """Utils for ChromeOS.""" 22 """Utils for ChromeOS."""
23 23
24 def LoginToDefaultAccount(self): 24 def LoginToDefaultAccount(self):
25 """Login to ChromeOS using default testing account. 25 """Login to ChromeOS using default testing account.
26 26
27 Usage: 27 Usage:
28 python chromeos_utils.py \ 28 python chromeos_utils.py \
29 chromeos_utils.ChromeosUtils.LoginToDefaultAccount 29 chromeos_utils.ChromeosUtils.LoginToDefaultAccount
30 """ 30 """
31 if self.GetLoginInfo()['is_logged_in']: 31 # Should auto-login. Nothing to do here.
dennis_jeffrey 2012/08/13 16:37:35 should we add a TODO to remove this function (and
32 logging.info('Already logged in as %s.' % self.GetLoginInfo()['email']) 32 pass
33 return
34 creds = constants.CREDENTIALS['$default']
35 username = creds[0]
36 passwd = creds[1]
37 self.Login(username, passwd)
38 assert self.GetLoginInfo()['is_logged_in']
39 logging.info('Logged in as %s.' % username)
40 33
41 34
42 if __name__ == '__main__': 35 if __name__ == '__main__':
43 pyauto.Main() 36 pyauto.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/netflix.py ('k') | chrome/test/pyautolib/policy_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698