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() |