Bug 590870: Allow mochitest domains that don't support XUL/XBL. r=ted a=test-only

This commit is contained in:
Jonas Sicking 2010-09-03 15:53:28 -07:00
parent 58149cb308
commit 21b686ea6a
3 changed files with 6 additions and 5 deletions

View File

@ -307,10 +307,10 @@ class Automation(object):
# Insert desired permissions
c = 0
for perm in permissions.keys():
for host in permissions[perm]:
for host,allow in permissions[perm]:
c += 1
cursor.execute("INSERT INTO moz_hosts values(?, ?, ?, 1, 0, 0)",
(c, host, perm))
cursor.execute("INSERT INTO moz_hosts values(?, ?, ?, ?, 0, 0)",
(c, host, perm, 1 if allow else 2))
# Commit and close
permDB.commit()
@ -327,7 +327,7 @@ class Automation(object):
# Set up permissions database
locations = self.readLocations()
self.setupPermissionsDatabase(profileDir,
{'allowXULXBL':map(lambda l: l.host, locations)});
{'allowXULXBL':[(l.host, 'noxul' not in l.options) for l in locations]});
part = """\
user_pref("browser.dom.window.dump.enabled", true);

View File

@ -106,6 +106,7 @@ http://sub1.test1.example.com:80 privileged
http://sub1.test2.example.com:80 privileged
http://sub2.test1.example.com:80 privileged
http://sub2.test2.example.com:80 privileged
http://noxul.example.com:80 privileged,noxul
https://example.com:443 privileged
https://test1.example.com:443 privileged

View File

@ -69,7 +69,7 @@ class RefTest(object):
"Sets up a profile for reftest."
self.automation.setupPermissionsDatabase(profileDir,
{'allowXULXBL': ['localhost', '<file>']})
{'allowXULXBL': [('localhost', True), ('<file>', True)]})
# Set preferences.
prefsFile = open(os.path.join(profileDir, "user.js"), "w")