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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 8804011: WebDriver extension support in TestingAutomationProvider. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments and minor issues Created 9 years 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 | « chrome/browser/automation/testing_automation_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 3638e10225870212dd68a97d26113d040b6d5370..fd55034818bcaba57b30a6d745f2a95ae5f184a5 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.
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698