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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/chromeos/chromeos_utils.py
diff --git a/chrome/test/pyautolib/chromeos/chromeos_utils.py b/chrome/test/pyautolib/chromeos/chromeos_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..774fae6e6e6e45603f6d1f4024df6b3a09eb2514
--- /dev/null
+++ b/chrome/test/pyautolib/chromeos/chromeos_utils.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+import os
+import sys
+
+
+def _SetupPaths():
+ sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
+ sys.path.append('/usr/local') # to import autotest libs
+
+_SetupPaths()
+
+from autotest.cros import constants
+import pyauto
+
+
+class ChromeosUtils(pyauto.PyUITest):
+ """Utils for ChromeOS."""
+
+ def LoginToDefaultAccount(self):
+ """Login to ChromeOS using default testing account.
+
+ Usage:
+ python chromeos_utils.py \
+ chromeos_utils.ChromeosUtils.LoginToDefaultAccount
+ """
+ creds = constants.CREDENTIALS['$default']
+ username = creds[0]
+ passwd = creds[1]
+ self.Login(username, passwd)
+ logging.info('Logged in as %s' % username)
+
+
+if __name__ == '__main__':
+ pyauto.Main()
« 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