Bug 913510 - Remove vestigial capability.principal prefs usage. r=bholley

This commit is contained in:
Masatoshi Kimura 2013-09-07 18:49:03 +09:00
parent 6036d9fe79
commit 61b066be51
5 changed files with 1 additions and 35 deletions

View File

@ -3,10 +3,6 @@ user_pref("browser.dom.window.dump.enabled", true);
user_pref("browser.sessionstore.resume_from_crash", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.xul.error_pages.enabled", true);
user_pref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
user_pref("capability.principal.codebase.p0.id", "file://");
user_pref("capability.principal.codebase.p1.granted", "UniversalXPConnect");
user_pref("capability.principal.codebase.p1.id", "http://localhost:4444");
user_pref("security.fileuri.strict_origin_policy", false);
user_pref("dom.allow_scripts_to_close_windows", true);
user_pref("dom.disable_open_during_load", false);

View File

@ -369,11 +369,6 @@ class RemoteReftest(RefTest):
# Make sure that opening the plugins check page won't hit the network
prefs["plugins.update.url"] = "http://127.0.0.1:8888/plugins-dummy/updateCheckURL"
# Workaround for jsreftests.
if options.enablePrivilege:
prefs["capability.principal.codebase.p2.granted"] = "UniversalXPConnect"
prefs["capability.principal.codebase.p2.id"] = "http://%s:%s" % (options.remoteWebServer, options.httpPort)
# Set the extra prefs.
profile.set_preferences(prefs)

View File

@ -421,11 +421,6 @@ class B2GReftest(RefTest):
prefs["toolkit.telemetry.prompted"] = 999
prefs["toolkit.telemetry.notifiedOptOut"] = 999
# Workaround for jsreftests.
if getattr(options, 'enablePrivilege', False):
prefs["capability.principal.codebase.p2.granted"] = "UniversalXPConnect"
prefs["capability.principal.codebase.p2.id"] = "http://%s:%s" % (options.remoteWebServer, options.httpPort)
# Set the extra prefs.
profile.set_preferences(prefs)

View File

@ -275,15 +275,7 @@ class Permissions(object):
returns a tuple of prefs, user_prefs
"""
# Grant God-power to all the privileged servers on which tests run.
prefs = []
privileged = [i for i in self._locations if "privileged" in i.options]
for (i, l) in itertools.izip(itertools.count(1), privileged):
prefs.append(("capability.principal.codebase.p%s.granted" % i, "UniversalXPConnect"))
prefs.append(("capability.principal.codebase.p%s.id" % i, "%s://%s:%s" %
(l.scheme, l.host, l.port)))
prefs.append(("capability.principal.codebase.p%s.subjectName" % i, ""))
if proxy:
user_prefs = self.pac_prefs(proxy)

View File

@ -119,19 +119,7 @@ http://127.0.0.1:8888 privileged
prefs, user_prefs = perms.network_prefs(False)
self.assertEqual(len(user_prefs), 0)
self.assertEqual(len(prefs), 6)
self.assertEqual(prefs[0], ('capability.principal.codebase.p1.granted',
'UniversalXPConnect'))
self.assertEqual(prefs[1], ('capability.principal.codebase.p1.id',
'http://mochi.test:8888'))
self.assertEqual(prefs[2], ('capability.principal.codebase.p1.subjectName', ''))
self.assertEqual(prefs[3], ('capability.principal.codebase.p2.granted',
'UniversalXPConnect'))
self.assertEqual(prefs[4], ('capability.principal.codebase.p2.id',
'http://127.0.0.1:8888'))
self.assertEqual(prefs[5], ('capability.principal.codebase.p2.subjectName', ''))
self.assertEqual(len(prefs), 0)
prefs, user_prefs = perms.network_prefs(True)
self.assertEqual(len(user_prefs), 2)