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

Side by Side 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 based on the CL review Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import pyauto_functional # pyauto_functional must come before pyauto.
7 import pyauto
8
9
10 class ChromeosBrowserTest(pyauto.PyUITest):
11
12 def testCloseAllTabs(self):
13 """Close all tabs and verify 1 tab is still open on Chrome OS."""
14 tab_count = self.GetTabCount()
15
16 for tab_index in xrange(tab_count - 1, -1, -1):
17 self.GetBrowserWindow(0).GetTab(tab_index).Close(True)
18
19 info = self.GetBrowserInfo()
20 self.assertEqual(1, len(info['windows']))
21 self.assertEqual(1, len(info['windows'][0]['tabs']))
22 url = info['windows'][0]['tabs'][0]['url']
23 self.assertEqual('chrome://newtab/', url,
24 msg='Unexpected URL: %s' % url)
25
26
27 if __name__ == '__main__':
28 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698