Commit 28339e77 authored by tturchetto@google.com's avatar tturchetto@google.com

Pyauto Test: adding test for Chrome OS close tabs

BUG=
TEST=this is a test

Review URL: http://codereview.chromium.org/7748032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98444 0039d316-1c4b-4281-b951-d872f2087c98
parent 1edefc46
......@@ -262,6 +262,7 @@
# primary chrome on ChromeOS.
'chromeos': [
'chromeos_basic',
'chromeos_browser',
'chromeos_firmware_version_checker',
'chromeos_power',
'chromeos_prefs',
......
#!/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.
import pyauto
class ChromeosBrowserTest(pyauto.PyUITest):
def testCloseAllTabs(self):
"""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)
if __name__ == '__main__':
pyauto_functional.Main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment