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

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: Removed a ling 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
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..bd6fb240932e031dca0e68ad473f647b1805c4f0 100755
--- a/chrome/test/functional/chromeos_login.py
+++ b/chrome/test/functional/chromeos_login.py
@@ -221,6 +221,46 @@ class ChromeosLogin(pyauto.PyUITest):
self.testGoodLogin() # Re-login with same account.
_VerifyProfile()
+class CroshLoginTest(pyauto.PyUITest):
+ """Tests for crosh in guest mode."""
+ def setUp(self):
Nirnimesh 2012/07/25 07:03:45 Do not create a separate class so that you can reu
tturchetto 2012/07/26 22:44:28 Done.
+ pyauto.PyUITest.setUp(self)
+ if self.GetLoginInfo()['is_logged_in']:
+ self.Logout()
+
+ def testGuestCrosh(self):
+ """Test we can use crosh in guest mode."""
Nirnimesh 2012/07/25 07:03:45 Test we can use -> Verify
tturchetto 2012/07/26 22:44:28 Done.
+ 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)
+
+ self.assertEqual(0, self.GetBrowserWindowCount())
Nirnimesh 2012/07/25 07:03:45 hereafter this test is very similar to the test in
tturchetto 2012/07/26 22:44:28 Done.
+ self.OpenCrosh()
+ self.assertEqual(1, self.GetBrowserWindowCount())
+ self.assertEqual(1, self.GetTabCount(),msg='Could not open crosh')
+ self.assertEqual('crosh', self.GetActiveTabTitle())
+
+ # 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.')
+ self.Logout()
Nirnimesh 2012/07/25 07:03:45 remove. Not necessary. Line 30 ensures that we get
tturchetto 2012/07/26 22:44:28 Done.
+
if __name__ == '__main__':
pyauto_functional.Main()
« chrome/test/functional/chromeos_crosh.py ('K') | « chrome/test/functional/chromeos_crosh.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698