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

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

Issue 8587004: Add PyAuto tests for triggering browser/page action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Dennis's comments Created 9 years, 1 month 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
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 9e179f6d7b74b87ca637ab356482d42ee5dc60f9..f4c804a0761144847e39a361c96eca083b700a86 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -1790,6 +1790,22 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
}
self._GetResultFromJSONRequest(cmd_dict)
+ def TriggerExtensionActionById(self, id, windex=0):
+ """Trigger browser/page action asynchronously in the active tab.
+
+ If the extension has a page action, the page action icon must be displayed.
dennis_jeffrey 2011/11/17 00:53:17 nit: ...the page action icon must be displayed bef
frankf 2011/11/21 02:01:46 Done.
+
+ Args:
+ id: The string id of the extension.
+ windex: Integer index of the browser window to use; defaults to 0
+ (first window).
+ """
+ cmd_dict = { # Prepare command for the json interface
+ 'command': 'TriggerExtensionActionById',
+ 'id': id,
+ }
+ self._GetResultFromJSONRequest(cmd_dict, windex=windex)
+
def UpdateExtensionsNow(self):
"""Auto-updates installed extensions.
« chrome/test/functional/extensions.py ('K') | « chrome/test/functional/extensions.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698