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

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

Issue 7748032: Close last tab test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified files based on the previous code review Created 9 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_browser.py
diff --git a/chrome/test/functional/chromeos_browser.py b/chrome/test/functional/chromeos_browser.py
new file mode 100755
index 0000000000000000000000000000000000000000..03538bf9bbcac2b977a4cb1c48274772cdcd88f4
--- /dev/null
+++ b/chrome/test/functional/chromeos_browser.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import pyauto_functional # pyauto_functional must come before pyauto
Nirnimesh 2011/08/26 01:14:59 nit: put another space before #
tturchetto 2011/08/26 01:22:24 Done.
+import pyauto
+
+
+class ChromeosBrowserTest(pyauto.PyUITest):
+ """Close last tab test for ChromeOS.
Nirnimesh 2011/08/26 01:14:59 Remove this
tturchetto 2011/08/26 01:22:24 Done.
+
+ Requires ChromeOS to be logged in.
Nirnimesh 2011/08/26 01:14:59 Remove this
tturchetto 2011/08/26 01:22:24 Done.
+ """
+
+ def testCloseAllTabs(self):
+ """Close all tabs and verifies 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']))
+ self.assertEqual('chrome://newtab/', info['windows'][0]['tabs'][0]['url'])
+ url = info['windows'][0]['tabs'][0]['url']
+ self.assertEqual('chrome://newtab/', url,
+ msg = 'Unexpected URL: %s' % url)
+
Nirnimesh 2011/08/26 01:14:59 need another blank line here
tturchetto 2011/08/26 01:22:24 Done.
+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