| 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', |
| 21 'about:appcache-internals': 'AppCache Internals', | 22 'about:appcache-internals': 'AppCache Internals', |
| 22 'about:credits': 'Credits', | 23 'about:credits': 'Credits', |
| 23 'about:dns': 'About DNS', | 24 'about:dns': 'About DNS', |
| 24 'about:histograms': 'About Histograms', | 25 'about:histograms': 'About Histograms', |
| 25 'about:plugins': 'Plug-ins', | 26 'about:plugins': 'Plug-ins', |
| 26 'about:sync': 'About Sync', | 27 'about:sync': 'About Sync', |
| 27 'about:version': 'About Version', | 28 'about:version': 'About Version', |
| 28 'chrome://downloads': 'Downloads', | 29 'chrome://downloads': 'Downloads', |
| 29 'chrome://extensions': 'Extensions', | 30 'chrome://extensions': 'Extensions', |
| 30 'chrome://history': 'History', | 31 'chrome://history': 'History', |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 """Test special tabs created by URLs like chrome://downloads, | 43 """Test special tabs created by URLs like chrome://downloads, |
| 43 chrome://extensions, chrome://history, etc.""" | 44 chrome://extensions, chrome://history, etc.""" |
| 44 for url, title in self.special_url_tabs.iteritems(): | 45 for url, title in self.special_url_tabs.iteritems(): |
| 45 self.NavigateToURL(url) | 46 self.NavigateToURL(url) |
| 46 self.assertEqual(title, self.GetActiveTabTitle()) | 47 self.assertEqual(title, self.GetActiveTabTitle()) |
| 47 | 48 |
| 48 | 49 |
| 49 if __name__ == '__main__': | 50 if __name__ == '__main__': |
| 50 pyauto_functional.Main() | 51 pyauto_functional.Main() |
| 51 | 52 |
| OLD | NEW |