Index: packagerSafari.py |
diff --git a/packagerSafari.py b/packagerSafari.py |
index 2d772e1406af19cc4d880180f7abfa137b2b72df..d999e943c1af764db6c453cb412bcdf861eb9ccc 100644 |
--- a/packagerSafari.py |
+++ b/packagerSafari.py |
@@ -11,7 +11,7 @@ import ConfigParser |
from urlparse import urlparse |
from packager import readMetadata, getDefaultFileName, getBuildVersion, getTemplate, Files |
-from packagerChrome import convertJS, importGeckoLocales, getIgnoredFiles, getPackageFiles, defaultLocale |
+from packagerChrome import convertJS, importGeckoLocales, getIgnoredFiles, getPackageFiles, defaultLocale, createScriptPage |
def processFile(path, data, params): |
return data |
@@ -93,14 +93,6 @@ def createManifest(params, files): |
developerIdentifier=params.get('developerIdentifier') |
).encode('utf-8') |
-def createBackgroundPage(params): |
- template = getTemplate('background.html.tmpl', autoEscape=True) |
- return template.render( |
- backgroundScripts=params['metadata'].get( |
- 'general', 'backgroundScripts' |
- ).split() |
- ).encode('utf-8') |
- |
def createInfoModule(params): |
template = getTemplate('safariInfo.js.tmpl') |
return template.render(params).encode('utf-8') |
@@ -258,12 +250,17 @@ def createBuild(baseDir, type, outFile=None, buildNum=None, releaseBuild=False, |
if metadata.has_section('import_locales'): |
importGeckoLocales(params, files) |
+ if metadata.has_option('general', 'testScripts'): |
+ files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', |
+ ('general', 'testScripts')) |
+ |
if keyFile: |
certs, key = get_certificates_and_key(keyFile) |
params['developerIdentifier'] = get_developer_identifier(certs) |
files['lib/info.js'] = createInfoModule(params) |
- files['background.html'] = createBackgroundPage(params) |
+ files['background.html'] = createScriptPage(params, 'background.html.tmpl', |
+ ('general', 'backgroundScripts')) |
files['Info.plist'] = createManifest(params, files) |
fixAbsoluteUrls(files) |