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

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

Issue 6410134: Use named automation interface to control primary chrome on ChromeOS (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: nit Created 9 years, 10 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
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import logging
7 import os
8 import sys
9
10
11 def _SetupPaths():
12 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
13 sys.path.append('/usr/local') # to import autotest libs
14
15 _SetupPaths()
16
17 from autotest.cros import constants
18 import pyauto
19
20
21 class ChromeosUtils(pyauto.PyUITest):
22 """Utils for ChromeOS."""
23
24 def LoginToDefaultAccount(self):
25 """Login to ChromeOS using default testing account.
26
27 Usage:
28 python chromeos_utils.py \
29 chromeos_utils.ChromeosUtils.LoginToDefaultAccount
30 """
31 creds = constants.CREDENTIALS['$default']
32 username = creds[0]
33 passwd = creds[1]
34 self.Login(username, passwd)
35 logging.info('Logged in as %s' % username)
36
37
38 if __name__ == '__main__':
39 pyauto.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_basic.py ('k') | chrome/test/pyautolib/chromeos/enable_testing.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698