diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 02:34:24 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 02:34:24 +0000 |
commit | 4518a589964dfcea81163a3e87d00ef2ad914bc3 (patch) | |
tree | a8c8f2e7ec93363c64398c62d97930a0ee3e6b87 /chrome/test/pyautolib | |
parent | 6a3a6343e0b8a49ced39005595f70f6f213d6bc3 (diff) | |
download | chromium_src-4518a589964dfcea81163a3e87d00ef2ad914bc3.zip chromium_src-4518a589964dfcea81163a3e87d00ef2ad914bc3.tar.gz chromium_src-4518a589964dfcea81163a3e87d00ef2ad914bc3.tar.bz2 |
Few minor changes to TestingAutomationProvider extension automation:
1) Wait for extension popup to load
2) Wait for extensions hosts to load in WaitForAllViews
3) Allow more than one browser action to be visible in views.
4) Add explicit IsPageActionVisible method
BUG=93571
TEST=none
Review URL: http://codereview.chromium.org/8804011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rwxr-xr-x | chrome/test/pyautolib/pyauto.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 3638e10..fd55034 100755 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -1822,7 +1822,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): 'command': 'UninstallExtensionById', 'id': id, } - return self._GetResultFromJSONRequest(cmd_dict)['success'] + return self._GetResultFromJSONRequest(cmd_dict, windex=-1)['success'] def SetExtensionStateById(self, id, enable, allow_in_incognito): """Set extension state: enable/disable, allow/disallow in incognito mode. @@ -1838,15 +1838,16 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): 'enable': enable, 'allow_in_incognito': allow_in_incognito, } - self._GetResultFromJSONRequest(cmd_dict) + self._GetResultFromJSONRequest(cmd_dict, windex=-1) - def TriggerPageActionById(self, id, windex=0): + def TriggerPageActionById(self, id, tab_index=0, windex=0): """Trigger page action asynchronously in the active tab. The page action icon must be displayed before invoking this function. Args: id: The string id of the extension. + tab_index: Integer index of the tab to use; defaults to 0 (first tab). windex: Integer index of the browser window to use; defaults to 0 (first window). """ @@ -1854,14 +1855,16 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): 'command': 'TriggerPageActionById', 'id': id, 'windex': windex, + 'tab_index': tab_index, } - self._GetResultFromJSONRequest(cmd_dict, windex=windex) + self._GetResultFromJSONRequest(cmd_dict, windex=-1) - def TriggerBrowserActionById(self, id, windex=0): + def TriggerBrowserActionById(self, id, tab_index=0, windex=0): """Trigger browser action asynchronously in the active tab. Args: id: The string id of the extension. + tab_index: Integer index of the tab to use; defaults to 0 (first tab). windex: Integer index of the browser window to use; defaults to 0 (first window). """ @@ -1869,8 +1872,9 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): 'command': 'TriggerBrowserActionById', 'id': id, 'windex': windex, + 'tab_index': tab_index, } - self._GetResultFromJSONRequest(cmd_dict, windex=windex) + self._GetResultFromJSONRequest(cmd_dict, windex=-1) def UpdateExtensionsNow(self): """Auto-updates installed extensions. |