| 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 os | 6 import os |
| 7 | 7 |
| 8 import pyauto_functional # Must be imported before pyauto | 8 import pyauto_functional # Must be imported before pyauto |
| 9 import pyauto | 9 import pyauto |
| 10 import test_utils | 10 import test_utils |
| 11 | 11 |
| 12 | 12 |
| 13 class SpecialTabsTest(pyauto.PyUITest): | 13 class SpecialTabsTest(pyauto.PyUITest): |
| 14 """TestCase for Special Tabs like about:version, chrome://history, etc.""" | 14 """TestCase for Special Tabs like about:version, chrome://history, etc.""" |
| 15 | 15 |
| 16 special_accelerator_tabs = { | 16 special_accelerator_tabs = { |
| 17 pyauto.IDC_SHOW_HISTORY: 'History', | 17 pyauto.IDC_SHOW_HISTORY: 'History', |
| 18 pyauto.IDC_MANAGE_EXTENSIONS: 'Extensions', | 18 pyauto.IDC_MANAGE_EXTENSIONS: 'Extensions', |
| 19 pyauto.IDC_SHOW_DOWNLOADS: 'Downloads', | 19 pyauto.IDC_SHOW_DOWNLOADS: 'Downloads', |
| 20 } | 20 } |
| 21 | 21 |
| 22 special_url_tabs = { | 22 special_url_tabs = { |
| 23 'about:': 'About Version', | 23 'about:': 'About Version', |
| 24 'about:about': 'About Pages', | 24 'about:about': 'Chrome URLs', |
| 25 'about:appcache-internals': 'AppCache Internals', | 25 'about:appcache-internals': 'AppCache Internals', |
| 26 'about:credits': 'Credits', | 26 'about:credits': 'Credits', |
| 27 'about:dns': 'About DNS', | 27 'about:dns': 'About DNS', |
| 28 'about:histograms': 'About Histograms', | 28 'about:histograms': 'About Histograms', |
| 29 'about:plugins': 'Plug-ins', | 29 'about:plugins': 'Plug-ins', |
| 30 'about:sync': 'Sync Internals', | 30 'about:sync': 'Sync Internals', |
| 31 'about:sync-internals': 'Sync Internals', | 31 'about:sync-internals': 'Sync Internals', |
| 32 'about:version': 'About Version', | 32 'about:version': 'About Version', |
| 33 'chrome://about': 'Chrome URLs', |
| 33 'chrome://downloads': 'Downloads', | 34 'chrome://downloads': 'Downloads', |
| 34 'chrome://extensions': 'Extensions', | 35 'chrome://extensions': 'Extensions', |
| 35 'chrome://history': 'History', | 36 'chrome://history': 'History', |
| 36 'chrome://newtab': 'New Tab', | 37 'chrome://newtab': 'New Tab', |
| 37 'chrome://sync-internals': 'Sync Internals', | 38 'chrome://sync-internals': 'Sync Internals', |
| 38 } | 39 } |
| 39 | 40 |
| 40 def _VerifyAppCacheInternals(self): | 41 def _VerifyAppCacheInternals(self): |
| 41 """Confirm about:appcache-internals contains expected content for Caches. | 42 """Confirm about:appcache-internals contains expected content for Caches. |
| 42 Also confirms that the about page populates Application Caches.""" | 43 Also confirms that the about page populates Application Caches.""" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 def testSpecialAcceratorTabs(self): | 84 def testSpecialAcceratorTabs(self): |
| 84 """Test special tabs created by acclerators like IDC_SHOW_HISTORY, | 85 """Test special tabs created by acclerators like IDC_SHOW_HISTORY, |
| 85 IDC_SHOW_DOWNLOADS.""" | 86 IDC_SHOW_DOWNLOADS.""" |
| 86 for accel, title in self.special_accelerator_tabs.iteritems(): | 87 for accel, title in self.special_accelerator_tabs.iteritems(): |
| 87 self.RunCommand(accel) | 88 self.RunCommand(accel) |
| 88 self.assertEqual(title, self.GetActiveTabTitle()) | 89 self.assertEqual(title, self.GetActiveTabTitle()) |
| 89 | 90 |
| 90 | 91 |
| 91 if __name__ == '__main__': | 92 if __name__ == '__main__': |
| 92 pyauto_functional.Main() | 93 pyauto_functional.Main() |
| OLD | NEW |