Index: chrome/test/functional/chromeos_browser.py |
diff --git a/chrome/test/functional/chromeos_browser.py b/chrome/test/functional/chromeos_browser.py |
index e5937eb7297228d7d63981ca5086fabb86bda5ef..306bee19dafb53e42ce6fa4da9060fdbe4a4ef1a 100755 |
--- a/chrome/test/functional/chromeos_browser.py |
+++ b/chrome/test/functional/chromeos_browser.py |
@@ -5,10 +5,25 @@ |
import pyauto_functional # pyauto_functional must come before pyauto. |
import pyauto |
+import test_utils |
class ChromeosBrowserTest(pyauto.PyUITest): |
+ def testCloseAllTabs(self): |
Nirnimesh
2012/04/24 22:01:45
did you forget to sync?
tturchetto
2012/04/24 22:09:51
Done.
|
+ """Close all tabs and verify 1 tab is still open on Chrome OS.""" |
+ tab_count = self.GetTabCount() |
+ |
+ for tab_index in xrange(tab_count - 1, -1, -1): |
+ self.GetBrowserWindow(0).GetTab(tab_index).Close(True) |
+ |
+ info = self.GetBrowserInfo() |
+ self.assertEqual(1, len(info['windows'])) |
+ self.assertEqual(1, len(info['windows'][0]['tabs'])) |
+ url = info['windows'][0]['tabs'][0]['url'] |
+ self.assertEqual('chrome://newtab/', url, |
+ msg='Unexpected URL: %s' % url) |
+ |
def testCannotCloseLastIncognito(self): |
"""Verify that last incognito window cannot be closed if it's the |
last window""" |
@@ -28,8 +43,8 @@ class ChromeosBrowserTest(pyauto.PyUITest): |
def testCrashBrowser(self): |
"""Verify that after broswer crash is recovered, user can still navigate |
to other URL.""" |
- crash_url = 'about:inducebrowsercrashforrealz' |
- self.NavigateToURL(crash_url) |
+ test_utils.CrashBrowser(self) |
+ self.RestartBrowser(clear_profile=False) |
url = self.GetHttpURLForDataPath('english_page.html') |
self.NavigateToURL(url) |
self.assertEqual('This page is in English', self.GetActiveTabTitle()) |