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): |