Bug 1269279 - Remove SEC_NORMAL from toolkit/components/passwordmgr/ (r=billm)

This commit is contained in:
Christoph Kerschbaumer 2016-05-06 15:15:23 +02:00
Родитель eb68ff098e
Коммит 280bbd924b
2 изменённых файлов: 11 добавлений и 23 удалений

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

@ -81,19 +81,14 @@
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let channel = Services.io.newChannel2(
"http://example.com",
null,
null,
null, // aLoadingNode
Services.scriptSecurityManager.getSystemPrincipal(),
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER
);
let channel = NetUtil.newChannel({
uri: "http://example.com",
loadUsingSystemPrincipal: true
});
let pps = Cc["@mozilla.org/network/protocol-proxy-service;1"].
getService(Ci.nsIProtocolProxyService);

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

@ -12,6 +12,8 @@
SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged");
const { NetUtil } = SpecialPowers.Cu.import('resource://gre/modules/NetUtil.jsm');
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
@ -144,23 +146,14 @@
function startup() {
//need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy.
var ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"]
.getService(SpecialPowers.Ci.nsIIOService);
var channel = NetUtil.newChannel({
uri: "http://example.com",
loadUsingSystemPrincipal: true
});
var pps = SpecialPowers.Cc["@mozilla.org/network/protocol-proxy-service;1"]
.getService();
var systemPrincipal = SpecialPowers.Services.scriptSecurityManager
.getSystemPrincipal();
var channel = ios.newChannel2("http://example.com",
null,
null,
null, // aLoadingNode
systemPrincipal,
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER);
pps.asyncResolve(channel, 0, resolveCallback);
}