mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset dc33bb49347d (bug 1175702)
This commit is contained in:
parent
78ab41b5d8
commit
8189f49267
@ -6858,14 +6858,6 @@ var gIdentityHandler = {
|
||||
checkIdentity : function(state, uri) {
|
||||
let nsIWebProgressListener = Ci.nsIWebProgressListener;
|
||||
|
||||
// For some URIs like data: we can't get a host. URIs without a host will
|
||||
// usually be treated as a non-secure connection if they're not on the
|
||||
// whitelist below and don't resolve to file:// URIs internally.
|
||||
let unknown = false;
|
||||
try {
|
||||
uri.host;
|
||||
} catch (e) { unknown = true; }
|
||||
|
||||
// Chrome URIs however get special treatment. Some chrome URIs are
|
||||
// whitelisted to provide a positive security signal to the user.
|
||||
let whitelist = /^about:(accounts|addons|app-manager|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|sessionrestore|support|welcomeback)/i;
|
||||
@ -6874,8 +6866,6 @@ var gIdentityHandler = {
|
||||
|
||||
if (isChromeUI) {
|
||||
mode = this.IDENTITY_MODE_CHROMEUI;
|
||||
} else if (unknown) {
|
||||
// Use default mode.
|
||||
} else if (state & nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
|
||||
if (state & nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT) {
|
||||
mode = this.IDENTITY_MODE_MIXED_ACTIVE_BLOCKED_IDENTIFIED;
|
||||
|
@ -43,6 +43,7 @@ var tests = [
|
||||
{
|
||||
name: "subdomain HTTPS",
|
||||
location: "https://test1.example.com/",
|
||||
|
||||
effectiveHost: "example.com",
|
||||
isHTTPS: true
|
||||
},
|
||||
@ -103,14 +104,12 @@ function nextTest() {
|
||||
|
||||
function checkResult() {
|
||||
// Sanity check other values, and the value of gIdentityHandler.getEffectiveHost()
|
||||
is(gIdentityHandler._uri.spec, gCurrentTest.location, "location matches for test " + gTestDesc);
|
||||
is(gIdentityHandler._lastUri.spec, gCurrentTest.location, "location matches for test " + gTestDesc);
|
||||
// getEffectiveHost can't be called for all modes
|
||||
if (gCurrentTest.effectiveHost === null) {
|
||||
let identityBox = document.getElementById("identity-box");
|
||||
is(identityBox.className == gIdentityHandler.IDENTITY_MODE_UNKNOWN || identityBox.className == gIdentityHandler.IDENTITY_MODE_CHROMEUI, true, "mode matched");
|
||||
} else {
|
||||
if (gCurrentTest.effectiveHost === null)
|
||||
is(gIdentityHandler._mode == gIdentityHandler.IDENTITY_MODE_UNKNOWN || gIdentityHandler._mode == gIdentityHandler.IDENTITY_MODE_CHROMEUI, true, "mode matched");
|
||||
else
|
||||
is(gIdentityHandler.getEffectiveHost(), gCurrentTest.effectiveHost, "effectiveHost matches for test " + gTestDesc);
|
||||
}
|
||||
|
||||
executeSoon(nextTest);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user