Bug 1165263 - Part 4: Update reftest runners to support new moz_hosts schema, r=dbaron

This commit is contained in:
Michael Layzell 2015-06-16 15:30:13 -04:00 коммит произвёл Ehsan Akhgari
Родитель a826bba3ff
Коммит 5f6646bf5e
3 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1177,6 +1177,9 @@ function ServeFiles(manifestPrincipal, depth, aURL, files)
var testbase = gIOService.newURI("http://localhost:" + gHttpServerPort +
path + dirPath, null, null);
// Give the testbase URI access to XUL and XBL
Services.perms.add(testbase, "allowXULXBL", Services.perms.ALLOW_ACTION);
function FileToURI(file)
{
// Only serve relative URIs via the HTTP server, not absolute

Просмотреть файл

@ -343,7 +343,7 @@ class RemoteReftest(RefTest):
self.server.stop()
def createReftestProfile(self, options, reftestlist):
profile = RefTest.createReftestProfile(self, options, reftestlist, server=options.remoteWebServer)
profile = RefTest.createReftestProfile(self, options, reftestlist, server=options.remoteWebServer, port=options.httpPort)
profileDir = profile.profile
prefs = {}

Просмотреть файл

@ -177,7 +177,7 @@ class RefTest(object):
def makeJSString(self, s):
return '"%s"' % re.sub(r'([\\"])', r'\\\1', s)
def createReftestProfile(self, options, manifest, server='localhost',
def createReftestProfile(self, options, manifest, server='localhost', port=0,
special_powers=True, profile_to_clone=None):
"""
Sets up a profile for reftest.
@ -187,7 +187,8 @@ class RefTest(object):
"""
locations = mozprofile.permissions.ServerLocations()
locations.add_host(server, port=0)
locations.add_host(server, scheme='http', port=port)
locations.add_host(server, scheme='https', port=port)
# Set preferences for communication between our command line arguments
# and the reftest harness. Preferences that are required for reftest