diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-12 19:14:04 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-12 19:14:04 +0000 |
commit | d4f0bd652042c6a4fd89af44f3974a3c9a71a1af (patch) | |
tree | 2f899edab6f9be4bae939b33f81afce7601b7be3 /chrome/test/pyautolib/pyauto.py | |
parent | c5d767959f5e51bb78c67d647a7d4e0fbfd48f50 (diff) | |
download | chromium_src-d4f0bd652042c6a4fd89af44f3974a3c9a71a1af.zip chromium_src-d4f0bd652042c6a4fd89af44f3974a3c9a71a1af.tar.gz chromium_src-d4f0bd652042c6a4fd89af44f3974a3c9a71a1af.tar.bz2 |
[pyauto] Add ability to force install an extension with experimental perms
Allow InstallExtension() to act as if a .crx is from the webstore, thereby
allowing it to install extensions with 'experimental' permissions.
R=aa@chromium.org
BUG=131486
TEST=
Review URL: https://chromiumcodereview.appspot.com/10540066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib/pyauto.py')
-rwxr-xr-x | chrome/test/pyautolib/pyauto.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index 1fae233..2fb12bf 100755 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -2045,7 +2045,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 @@ -2056,6 +2057,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). @@ -2071,6 +2075,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): |