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

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

Issue 10134043: Used test util to crash the browser, and restart the browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_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())
« 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