diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 18:39:02 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-13 18:39:02 +0000 |
commit | 765f31094cf6cb7ea4962486c63a5fdffcbfeb65 (patch) | |
tree | 5e958a2435409d8c0f05dcf3eef93e5aa2240976 /chrome/test/functional/special_tabs.py | |
parent | a04f8002d45c2d368faf275d0d019e0b3f60844c (diff) | |
download | chromium_src-765f31094cf6cb7ea4962486c63a5fdffcbfeb65.zip chromium_src-765f31094cf6cb7ea4962486c63a5fdffcbfeb65.tar.gz chromium_src-765f31094cf6cb7ea4962486c63a5fdffcbfeb65.tar.bz2 |
Add tests to verify special tabs like chrome://history chrome://downloads, ...
Most tests from krisr
Review URL: http://codereview.chromium.org/1541009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional/special_tabs.py')
-rw-r--r-- | chrome/test/functional/special_tabs.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/chrome/test/functional/special_tabs.py b/chrome/test/functional/special_tabs.py new file mode 100644 index 0000000..654d147 --- /dev/null +++ b/chrome/test/functional/special_tabs.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# Copyright (c) 2010 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 # Must be imported before pyauto +import pyauto + + +class SpecialTabsTest(pyauto.PyUITest): + """TestCase for Special Tabs like about:version, chrome://history, etc.""" + + special_accelerator_tabs = { + pyauto.IDC_SHOW_HISTORY: 'History', + pyauto.IDC_MANAGE_EXTENSIONS: 'Extensions', + pyauto.IDC_SHOW_DOWNLOADS: 'Downloads', + } + + special_url_tabs = { + 'about:': 'About Version', + 'about:dns': 'About DNS', + 'about:histograms': 'About Histograms', + 'about:plugins': 'Plug-ins', + 'about:sync': 'About Sync', + 'about:version': 'About Version', + 'chrome://downloads': 'Downloads', + 'chrome://extensions': 'Extensions', + 'chrome://history': 'History', + 'chrome://net-internals': 'Network internals', + } + + def testSpecialAccleratorTabs(self): + """Test special tabs created by acclerators like IDC_SHOW_HISTORY, + IDC_SHOW_DOWNLOADS.""" + for accel, title in self.special_accelerator_tabs.iteritems(): + self.RunCommand(accel) + self.assertEqual(title, self.GetActiveTabTitle()) + + def testSpecialURLTabs(self): + """Test special tabs created by URLs like chrome://downloads, + chrome://extensions, chrome://history, etc.""" + for url, title in self.special_url_tabs.iteritems(): + self.NavigateToURL(url) + self.assertEqual(title, self.GetActiveTabTitle()) + + +if __name__ == '__main__': + pyauto_functional.Main() + |