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

Unified 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, 5 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_crosh.py ('k') | chrome/test/functional/test_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/chromeos_login.py
diff --git a/chrome/test/functional/chromeos_login.py b/chrome/test/functional/chromeos_login.py
index ebfe4e73e70ecbf5dceee7befebc023d0529ab56..607a9a97051c9850f20e160258fa5b74e01b6264 100755
--- a/chrome/test/functional/chromeos_login.py
+++ b/chrome/test/functional/chromeos_login.py
@@ -10,6 +10,7 @@ import sys
import pyauto_functional # Must be imported before pyauto
import pyauto
import pyauto_errors
+import test_utils
sys.path.append('/usr/local') # To make autotest libs importable.
@@ -221,6 +222,33 @@ class ChromeosLogin(pyauto.PyUITest):
self.testGoodLogin() # Re-login with same account.
_VerifyProfile()
+ def testGuestCrosh(self):
+ """Verify we can use crosh in guest mode."""
+ self.LoginAsGuest()
+ login_info = self.GetLoginInfo()
+ self.assertTrue(login_info['is_logged_in'], msg='Not logged in at all.')
+ self.assertTrue(login_info['is_guest'], msg='Not logged in as guest.')
+ for _ in range(self.GetBrowserWindowCount()):
+ self.CloseBrowserWindow(0)
+ test_utils.OpenCroshVerification(self)
+
+ # Verify crosh prompt.
+ self.WaitForHtermText(text='crosh> ',
+ msg='Could not find "crosh> " prompt')
+ self.assertTrue(
+ self.GetHtermRowsText(start=0, end=2).endswith('crosh> '),
+ msg='Could not find "crosh> " prompt')
+
+ # Run a crosh command.
+ self.SendKeysToHterm('help\\n')
+ self.WaitForHtermText(text='help_advanced',
+ msg='Could not find "help_advanced" in help output.')
+
+ # Exit crosh and close tab.
+ self.SendKeysToHterm('exit\\n')
+ self.WaitForHtermText(text='command crosh completed with exit code 0',
+ msg='Could not exit crosh.')
+
if __name__ == '__main__':
pyauto_functional.Main()
« 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