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

Unified Diff: chrome/test/functional/chromeos_crosh.py

Issue 10826170: Adding pyautotest: testMultipleWindowCrosh (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/chromeos_crosh.py
diff --git a/chrome/test/functional/chromeos_crosh.py b/chrome/test/functional/chromeos_crosh.py
index f1a7cb6f9293da3b850972058497fb1aaec82b1d..bcc33163e73e605dbb3c045b8a8ebca4240eb75c 100755
--- a/chrome/test/functional/chromeos_crosh.py
+++ b/chrome/test/functional/chromeos_crosh.py
@@ -58,6 +58,29 @@ class CroshTest(pyauto.PyUITest):
self.assertEqual(node['name'], name)
self.assertEqual(url.spec(), node['url'])
+ def testMultipleWindowCrosh(self):
+ """Test that crosh can be opened in multiple windows."""
+ test_utils.OpenCroshVerification(self)
+
+ for windex in range (1, 4): # 3 new windows
+ self.OpenNewBrowserWindow(True)
+ self.OpenCrosh()
+ self.assertEqual('crosh', self.GetActiveTabTitle())
+
+ # Verify crosh prompt.
+ self.WaitForHtermText(text='crosh> ', tab_index=1, windex=windex,
Nirnimesh 2012/08/06 21:49:48 why is the tab_index hardcoded to 1?
tturchetto 2012/08/06 21:53:48 Because open browser takes tab 0, open crosh takes
Nirnimesh 2012/08/06 22:03:02 What's the point of checking the same thing 3 time
tturchetto 2012/08/06 22:28:53 Because if it doesn't mention the tab, test would
Nirnimesh 2012/08/06 22:34:46 You're telling me symptoms for what's not working.
+ msg='Could not find "crosh> " prompt')
+ self.assertTrue(
+ self.GetHtermRowsText(start=0, end=2, tab_index=1,
Nirnimesh 2012/08/06 21:49:48 ditto
tturchetto 2012/08/06 21:53:48 ditto
+ windex=windex).endswith('crosh> '),
+ msg='Could not find "crosh> " prompt')
+
+ # Exit crosh.
+ self.SendKeysToHterm('exit\\n', tab_index=1, windex=windex)
+ self.WaitForHtermText(text='command crosh completed with exit code 0',
+ tab_index=1, windex=windex,
+ msg='Could not exit crosh.')
+
if __name__ == '__main__':
pyauto_functional.Main()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698