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

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

Issue 10540066: [pyauto] Add ability to force install an extension with experimental perms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « 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 e8177ed7548c8512679202bde30813b061e887c0..c524a1c9644e8eeb19ee2dabd0b171d19a9b9b7a 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -2046,7 +2046,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
tab_index=tab_index, window_index=window_index)['page_translated'],
args=[tab_index, window_index])
- def InstallExtension(self, extension_path, with_ui=False, windex=0):
+ def InstallExtension(self, extension_path, with_ui=False, from_webstore=None,
+ windex=0):
"""Installs an extension from the given path.
The path must be absolute and may be a crx file or an unpacked extension
@@ -2057,6 +2058,9 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
extension_path: The absolute path to the extension to install. If the
extension is packed, it must have a .crx extension.
with_ui: Whether the extension install confirmation UI should be shown.
+ from_webstore: If True, forces a .crx extension to be recognized as one
+ from the webstore. Can be used to force install an extension with
+ 'experimental' permissions.
windex: Integer index of the browser window to use; defaults to 0
(first window).
@@ -2072,6 +2076,8 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
'with_ui': with_ui,
'windex': windex,
}
+ if from_webstore:
+ cmd_dict['from_webstore'] = True
return self._GetResultFromJSONRequest(cmd_dict, windex=None)['id']
def GetExtensionsInfo(self, windex=0):
« 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