OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import pyauto_functional # Must be imported before pyauto | 6 import pyauto_functional # Must be imported before pyauto |
7 import pyauto | 7 import pyauto |
8 | 8 |
9 | 9 |
10 class SpecialTabsTest(pyauto.PyUITest): | 10 class SpecialTabsTest(pyauto.PyUITest): |
11 """TestCase for Special Tabs like about:version, chrome://history, etc.""" | 11 """TestCase for Special Tabs like about:version, chrome://history, etc.""" |
12 | 12 |
13 special_accelerator_tabs = { | 13 special_accelerator_tabs = { |
14 pyauto.IDC_SHOW_HISTORY: 'History', | 14 pyauto.IDC_SHOW_HISTORY: 'History', |
15 pyauto.IDC_MANAGE_EXTENSIONS: 'Extensions', | 15 pyauto.IDC_MANAGE_EXTENSIONS: 'Extensions', |
16 pyauto.IDC_SHOW_DOWNLOADS: 'Downloads', | 16 pyauto.IDC_SHOW_DOWNLOADS: 'Downloads', |
17 } | 17 } |
18 | 18 |
19 special_url_tabs = { | 19 special_url_tabs = { |
20 'about:': 'About Version', | 20 'about:': 'About Version', |
21 'about:about': 'About Pages', | |
22 'about:appcache-internals': 'AppCache Internals', | 21 'about:appcache-internals': 'AppCache Internals', |
23 'about:credits': 'Credits', | 22 'about:credits': 'Credits', |
24 'about:dns': 'About DNS', | 23 'about:dns': 'About DNS', |
25 'about:histograms': 'About Histograms', | 24 'about:histograms': 'About Histograms', |
26 'about:plugins': 'Plug-ins', | 25 'about:plugins': 'Plug-ins', |
27 'about:sync': 'About Sync', | 26 'about:sync': 'About Sync', |
28 'about:version': 'About Version', | 27 'about:version': 'About Version', |
29 'chrome://downloads': 'Downloads', | 28 'chrome://downloads': 'Downloads', |
30 'chrome://extensions': 'Extensions', | 29 'chrome://extensions': 'Extensions', |
31 'chrome://history': 'History', | 30 'chrome://history': 'History', |
(...skipping 11 matching lines...) Expand all Loading... |
43 """Test special tabs created by URLs like chrome://downloads, | 42 """Test special tabs created by URLs like chrome://downloads, |
44 chrome://extensions, chrome://history, etc.""" | 43 chrome://extensions, chrome://history, etc.""" |
45 for url, title in self.special_url_tabs.iteritems(): | 44 for url, title in self.special_url_tabs.iteritems(): |
46 self.NavigateToURL(url) | 45 self.NavigateToURL(url) |
47 self.assertEqual(title, self.GetActiveTabTitle()) | 46 self.assertEqual(title, self.GetActiveTabTitle()) |
48 | 47 |
49 | 48 |
50 if __name__ == '__main__': | 49 if __name__ == '__main__': |
51 pyauto_functional.Main() | 50 pyauto_functional.Main() |
52 | 51 |
OLD | NEW |