OLD | NEW |
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 Loading... |
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() |
OLD | NEW |