Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: chrome/test/functional/special_tabs.py

Issue 8403018: Fix special_tabs.SpecialTabsTest.testSpecialAcceratorTabs for chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/special_tabs.py
diff --git a/chrome/test/functional/special_tabs.py b/chrome/test/functional/special_tabs.py
index 735e2fb9682b0e5d993e95e101cee475cb38d862..8f18908550a5f6be8de6d37dd12b5afc622dad63 100644
--- a/chrome/test/functional/special_tabs.py
+++ b/chrome/test/functional/special_tabs.py
@@ -13,12 +13,19 @@ import test_utils
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: '%s - Extensions' % ('Options' if
- pyauto.PyUITest.IsWin() else 'Preferences'),
- pyauto.IDC_SHOW_DOWNLOADS: 'Downloads',
- }
+ @staticmethod
+ def GetSpecialAcceleratorTabs():
+ """Get a dict of accels and corresponding tab title."""
dennis_jeffrey 2011/10/27 01:25:17 nit: "accels" --> "accelerators" "title" -->
+ ret = {
+ pyauto.IDC_SHOW_HISTORY: 'History',
+ pyauto.IDC_MANAGE_EXTENSIONS: 'Preferences - Extensions',
+ pyauto.IDC_SHOW_DOWNLOADS: 'Downloads',
+ }
+ if pyauto.PyUITest.IsWin():
+ ret[pyauto.IDC_MANAGE_EXTENSIONS] = 'Options - Extensions'
+ elif pyauto.PyUITest.IsChromeOS():
+ ret[pyauto.IDC_MANAGE_EXTENSIONS] = 'Settings - Extensions'
+ return ret
special_url_redirects = {
'about:': 'chrome://version',
@@ -108,6 +115,7 @@ class SpecialTabsTest(pyauto.PyUITest):
'chrome://settings/clearBrowserData':
{ 'title': 'Settings - Clear Browsing Data' },
'chrome://settings/content': { 'title': 'Settings - Content Settings' },
+ 'chrome://settings/extensions': { 'title': 'Settings - Extensions' },
'chrome://settings/internet': { 'title': 'Settings - Internet' },
'chrome://settings/languages':
{ 'title': 'Settings - Languages and Input' },
@@ -323,7 +331,7 @@ class SpecialTabsTest(pyauto.PyUITest):
def testSpecialAcceratorTabs(self):
"""Test special tabs created by acclerators like IDC_SHOW_HISTORY,
IDC_SHOW_DOWNLOADS."""
- for accel, title in self.special_accelerator_tabs.iteritems():
+ for accel, title in self.GetSpecialAcceleratorTabs().iteritems():
self.RunCommand(accel)
self.assertTrue(self.WaitUntil(
self.GetActiveTabTitle, expect_retval=title),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698