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

Side by Side Diff: chrome/test/functional/chromeos_login.py

Issue 10778006: Adding HTML Terminal test case: 1. TestAddBookmark, 2. Login as guest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modification based on CL review. 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_crosh.py ('k') | chrome/test/functional/test_utils.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 14
14 15
15 sys.path.append('/usr/local') # To make autotest libs importable. 16 sys.path.append('/usr/local') # To make autotest libs importable.
16 from autotest.cros import cros_ui 17 from autotest.cros import cros_ui
17 from autotest.cros import cryptohome 18 from autotest.cros import cryptohome
18 19
19 20
20 class ChromeosLogin(pyauto.PyUITest): 21 class ChromeosLogin(pyauto.PyUITest):
21 """TestCases for Logging into ChromeOS.""" 22 """TestCases for Logging into ChromeOS."""
22 23
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 msg='/home/chronos/__magic__ did not persist across login sessions') 215 msg='/home/chronos/__magic__ did not persist across login sessions')
215 self.assertTrue(os.path.exists('/home/chronos/user/__magic__'), 216 self.assertTrue(os.path.exists('/home/chronos/user/__magic__'),
216 msg='/home/chronos/user/__magic__ did not persist across ' 217 msg='/home/chronos/user/__magic__ did not persist across '
217 'login sessions') 218 'login sessions')
218 219
219 _VerifyProfile() 220 _VerifyProfile()
220 self.Logout() 221 self.Logout()
221 self.testGoodLogin() # Re-login with same account. 222 self.testGoodLogin() # Re-login with same account.
222 _VerifyProfile() 223 _VerifyProfile()
223 224
225 def testGuestCrosh(self):
226 """Verify we can use crosh in guest mode."""
227 self.LoginAsGuest()
228 login_info = self.GetLoginInfo()
229 self.assertTrue(login_info['is_logged_in'], msg='Not logged in at all.')
230 self.assertTrue(login_info['is_guest'], msg='Not logged in as guest.')
231 for _ in range(self.GetBrowserWindowCount()):
232 self.CloseBrowserWindow(0)
233 test_utils.OpenCroshVerification(self)
234
235 # Verify crosh prompt.
236 self.WaitForHtermText(text='crosh> ',
237 msg='Could not find "crosh> " prompt')
238 self.assertTrue(
239 self.GetHtermRowsText(start=0, end=2).endswith('crosh> '),
240 msg='Could not find "crosh> " prompt')
241
242 # Run a crosh command.
243 self.SendKeysToHterm('help\\n')
244 self.WaitForHtermText(text='help_advanced',
245 msg='Could not find "help_advanced" in help output.')
246
247 # Exit crosh and close tab.
248 self.SendKeysToHterm('exit\\n')
249 self.WaitForHtermText(text='command crosh completed with exit code 0',
250 msg='Could not exit crosh.')
251
224 252
225 if __name__ == '__main__': 253 if __name__ == '__main__':
226 pyauto_functional.Main() 254 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/chromeos_crosh.py ('k') | chrome/test/functional/test_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698