Bug 1202421 - Rename the network.auth.allow-subresource-auth pref. r=michal

This commit is contained in:
Dragana Damjanovic dd.mozilla@gmail.com 2015-09-08 08:21:19 -07:00
parent 7dbbd16aa2
commit 9230fbd5d8
8 changed files with 16 additions and 16 deletions

View File

@ -12,7 +12,7 @@
SimpleTest.waitForExplicitFinish();
// Turn off the authentication dialog blocking for this test.
SpecialPowers.setIntPref("network.auth.allow-subresource-auth", 2)
SpecialPowers.setIntPref("network.auth.subresource-http-auth-allow", 2)
var tests = [
// Not the same origin no CORS asked for, should have silence

View File

@ -1786,7 +1786,7 @@ pref("network.generic-ntlm-auth.workstation", "WORKSTATION");
// 1 - allow sub-resources to open HTTP authentication credentials dialogs,
// but don't allow it for cross-origin sub-resources
// 2 - allow the cross-origin authentication as well.
pref("network.auth.allow-subresource-auth", 2);
pref("network.auth.subresource-http-auth-allow", 2);
pref("permissions.default.image", 1); // 1-Accept, 2-Deny, 3-dontAcceptForeign

View File

@ -75,15 +75,15 @@ nsHttpChannelAuthProvider::~nsHttpChannelAuthProvider()
}
uint32_t nsHttpChannelAuthProvider::sAuthAllowPref =
SUBRESOURCE_AUTH_DIALOG_DISALLOW_CROSS_ORIGIN;
SUBRESOURCE_AUTH_DIALOG_ALLOW_ALL;
void
nsHttpChannelAuthProvider::InitializePrefs()
{
MOZ_ASSERT(NS_IsMainThread());
mozilla::Preferences::AddUintVarCache(&sAuthAllowPref,
"network.auth.allow-subresource-auth",
SUBRESOURCE_AUTH_DIALOG_DISALLOW_CROSS_ORIGIN);
"network.auth.subresource-http-auth-allow",
SUBRESOURCE_AUTH_DIALOG_ALLOW_ALL);
}
NS_IMETHODIMP

View File

@ -1,5 +1,5 @@
// This file tests authentication prompt depending on pref
// network.auth.allow-subresource-auth:
// network.auth.subresource-http-auth-allow:
// 0 - don't allow sub-resources to open HTTP authentication credentials
// dialogs
// 1 - allow sub-resources to open HTTP authentication credentials dialogs,
@ -130,9 +130,9 @@ function makeChan(loadingUrl, url, contentPolicy) {
return chan;
}
function Test(allow_subresource_auth_pref, loadingUri, uri, contentPolicy,
function Test(subresource_http_auth_allow_pref, loadingUri, uri, contentPolicy,
expectedCode) {
this._allow_subresource_auth_pref = allow_subresource_auth_pref;
this._subresource_http_auth_allow_pref = subresource_http_auth_allow_pref;
this._loadingUri = loadingUri;
this._uri = uri;
this._contentPolicy = contentPolicy;
@ -140,7 +140,7 @@ function Test(allow_subresource_auth_pref, loadingUri, uri, contentPolicy,
}
Test.prototype = {
_allow_subresource_auth_pref: 1,
_subresource_http_auth_allow_pref: 1,
_loadingUri: null,
_uri: null,
_contentPolicy: Ci.nsIContentPolicy.TYPE_OTHER,
@ -183,14 +183,14 @@ Test.prototype = {
},
run: function() {
dump("Run test: " + this._allow_subresource_auth_pref
dump("Run test: " + this._subresource_http_auth_allow_pref
+ this._loadingUri
+ this._uri
+ this._contentPolicy
+ this._expectedCode + " \n");
prefs.setIntPref("network.auth.allow-subresource-auth",
this._allow_subresource_auth_pref);
prefs.setIntPref("network.auth.subresource-http-auth-allow",
this._subresource_http_auth_allow_pref);
let chan = makeChan(this._loadingUri, this._uri, this._contentPolicy);
chan.notificationCallbacks = new Requestor(this._expectedCode == 200);
chan.asyncOpen(this, null);

View File

@ -245,7 +245,7 @@ function run_test() {
prefs.setIntPref("network.proxy.type", 1);
// Turn off the authentication dialog blocking for this test.
prefs.setIntPref("network.auth.allow-subresource-auth", 2);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
tests[current_test]();
}

View File

@ -7,7 +7,7 @@ Cu.import("resource://gre/modules/Services.jsm");
// Turn off the authentication dialog blocking for this test.
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
prefs.setIntPref("network.auth.allow-subresource-auth", 2);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
XPCOMUtils.defineLazyGetter(this, "URL", function() {
return "http://localhost:" + httpserv.identity.primaryPort;

View File

@ -14,7 +14,7 @@
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
prefs.setIntPref("network.auth.allow-subresource-auth", 2);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
// Class monitoring number of open dialog windows
// It checks there is always open just a single dialog per application
function dialogMonitor() {

View File

@ -10,7 +10,7 @@ function test() {
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
prefs.setIntPref("network.auth.allow-subresource-auth", 2);
prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
var pm = Services.perms;
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);