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 committed by Ehsan Akhgari
parent a826bba3ff
commit 5f6646bf5e
3 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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 = {}

View File

@ -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