Bug 647414 - Distributed extensions should be automatically installed into temporary testing profile; (Bv3) Make installExtensionsToProfile() automatically install application distributed extensions.

r=jmaher.
This commit is contained in:
Serge Gautherie 2011-04-18 18:48:23 +02:00
parent 1f85231808
commit 0367a3c083
2 changed files with 16 additions and 2 deletions

View File

@ -178,7 +178,14 @@ class RefTest(object):
continue
def installExtensionsToProfile(self, options, profileDir):
"Install the specified extensions on the command line to the testing profile."
"Install application distributed extensions and specified on the command line ones to testing profile."
# Install distributed extensions, if application has any.
distExtDir = os.path.join(options.app[ : options.app.rfind(os.sep)], "distribution", "extensions")
if os.path.isdir(distExtDir):
for f in os.listdir(distExtDir):
self.automation.installExtension(os.path.join(distExtDir, f), profileDir)
# Install custom extensions.
for f in options.extensionsToInstall:
self.automation.installExtension(self.getFullPath(f), profileDir)

View File

@ -771,7 +771,14 @@ overlay chrome://browser/content/browser.xul chrome://mochikit/content/browser-t
continue
def installExtensionsToProfile(self, options):
"Install the specified extensions on the command line to the testing profile."
"Install application distributed extensions and specified on the command line ones to testing profile."
# Install distributed extensions, if application has any.
distExtDir = os.path.join(options.app[ : options.app.rfind(os.sep)], "distribution", "extensions")
if os.path.isdir(distExtDir):
for f in os.listdir(distExtDir):
self.automation.installExtension(os.path.join(distExtDir, f), options.profilePath)
# Install custom extensions.
for f in options.extensionsToInstall:
self.automation.installExtension(self.getFullPath(f), options.profilePath)