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

Side by Side Diff: chrome/test/functional/chromeos_login.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/chromeos_device_policy.py ('k') | chrome/test/functional/netflix.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 os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 import pyauto_functional # Must be imported before pyauto 10 import pyauto_functional # Must be imported before pyauto
11 import pyauto 11 import pyauto
12 import pyauto_errors 12 import pyauto_errors
13 import test_utils 13 import test_utils
14 14
15 15
16 sys.path.append('/usr/local') # To make autotest libs importable. 16 sys.path.append('/usr/local') # To make autotest libs importable.
17 from autotest.cros import cros_ui 17 from autotest.cros import cros_ui
18 from autotest.cros import cryptohome 18 from autotest.cros import cryptohome
19 19
20 20
21 class ChromeosLogin(pyauto.PyUITest): 21 class ChromeosLogin(pyauto.PyUITest):
22 """TestCases for Logging into ChromeOS.""" 22 """TestCases for Logging into ChromeOS."""
23 23
24 assert os.geteuid() == 0, 'Need to run this test as root' 24 assert os.geteuid() == 0, 'Need to run this test as root'
25 25
26 def ShouldAutoLogin(self):
27 return False
28
26 def setUp(self): 29 def setUp(self):
27 # We want a clean session_manager instance for every run, 30 # We want a clean session_manager instance for every run,
28 # so restart ui now. 31 # so restart ui now.
29 cros_ui.stop(allow_fail=True) 32 cros_ui.stop(allow_fail=True)
30 cryptohome.remove_all_vaults() 33 cryptohome.remove_all_vaults()
31 cros_ui.start(wait_for_login_prompt=False) 34 cros_ui.start(wait_for_login_prompt=False)
32 pyauto.PyUITest.setUp(self) 35 pyauto.PyUITest.setUp(self)
33 36
34 def _ValidCredentials(self, account_type='test_google_account'): 37 def _ValidCredentials(self, account_type='test_google_account'):
35 """Obtains a valid username and password from a data file. 38 """Obtains a valid username and password from a data file.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 msg='Could not find "help_advanced" in help output.') 248 msg='Could not find "help_advanced" in help output.')
246 249
247 # Exit crosh and close tab. 250 # Exit crosh and close tab.
248 self.SendKeysToHterm('exit\\n') 251 self.SendKeysToHterm('exit\\n')
249 self.WaitForHtermText(text='command crosh completed with exit code 0', 252 self.WaitForHtermText(text='command crosh completed with exit code 0',
250 msg='Could not exit crosh.') 253 msg='Could not exit crosh.')
251 254
252 255
253 if __name__ == '__main__': 256 if __name__ == '__main__':
254 pyauto_functional.Main() 257 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_device_policy.py ('k') | chrome/test/functional/netflix.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698