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
Родитель fe6f9ed5f4
Коммит 615dfec538
3 изменённых файлов: 6 добавлений и 5 удалений

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

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

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

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

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

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