Backed out changeset adac78d7a8f9 (bug 1570678) for siteIdentity related failures CLOSED TREE

This commit is contained in:
Bogdan Tara 2020-05-12 01:39:11 +03:00
parent ee479fe473
commit 3a5ced7037
6 changed files with 19 additions and 39 deletions

View File

@ -714,7 +714,7 @@ var gIdentityHandler = {
gBrowser.selectedBrowser.documentURI.scheme == "chrome"))
) {
// This is a local resource (and shouldn't be marked insecure).
this._identityBox.className = "localResource";
this._identityBox.className = "unknownIdentity";
} else {
// This is an insecure connection.
let warnOnInsecure =

View File

@ -61,7 +61,7 @@ async function webpageTest(secureCheck) {
}
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
if (secureCheck) {
@ -96,7 +96,7 @@ async function webpageTestTextWarning(secureCheck) {
}
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
if (secureCheck) {
@ -180,7 +180,7 @@ async function blankPageTest(secureCheck) {
"valid",
"pageproxystate should be valid"
);
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(
@ -207,7 +207,7 @@ async function secureTest(secureCheck) {
is(getIdentityMode(), "verifiedDomain", "Identity should be verified");
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(getIdentityMode(), "verifiedDomain", "Identity should be verified");
@ -240,7 +240,7 @@ async function insecureTest(secureCheck) {
}
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
if (secureCheck) {
@ -273,7 +273,7 @@ async function addonsTest(secureCheck) {
is(getIdentityMode(), "chromeUI", "Identity should be chrome");
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(getIdentityMode(), "chromeUI", "Identity should be chrome");
@ -298,7 +298,7 @@ async function fileTest(secureCheck) {
is(getConnectionState(), "file", "Connection should be file");
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(getConnectionState(), "file", "Connection should be file");
@ -324,11 +324,7 @@ async function resourceUriTest(secureCheck) {
is(getConnectionState(), "file", "Connection should be file");
gBrowser.selectedTab = oldTab;
is(
getIdentityMode(),
"localResource",
"Identity should be a local a resource"
);
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(getConnectionState(), "file", "Connection should be file");
@ -365,7 +361,7 @@ async function noCertErrorTest(secureCheck) {
);
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(
@ -458,7 +454,7 @@ async function aboutUriTest(secureCheck) {
is(getConnectionState(), "file", "Connection should be file");
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
is(getConnectionState(), "file", "Connection should be file");
@ -509,7 +505,7 @@ async function dataUriTest(secureCheck) {
}
gBrowser.selectedTab = oldTab;
is(getIdentityMode(), "localResource", "Identity should be localResource");
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
gBrowser.selectedTab = newTab;
if (secureCheck) {
@ -561,8 +557,8 @@ async function pbModeTest(prefs, secureCheck) {
privateWin.gBrowser.selectedTab = oldTab;
is(
getIdentityMode(privateWin),
"localResource",
"Identity should be localResource"
"unknownIdentity",
"Identity should be unknown"
);
privateWin.gBrowser.selectedTab = newTab;

View File

@ -30,7 +30,7 @@ const TEST_CASES = [
{
type: "non-chrome about page",
testURL: "about:about",
img_url: `url("chrome://global/skin/icons/document.svg")`,
img_url: `url("chrome://global/skin/icons/identity-icon.svg")`,
},
{
type: "chrome about page",
@ -40,12 +40,7 @@ const TEST_CASES = [
{
type: "file",
testURL: "dummy_page.html",
img_url: `url("chrome://global/skin/icons/document.svg")`,
},
{
type: "resource",
testURL: "resource://gre/modules/Log.jsm",
img_url: `url("chrome://global/skin/icons/document.svg")`,
img_url: `url("chrome://global/skin/icons/identity-icon.svg")`,
},
{
type: "mixedPassiveContent",
@ -65,12 +60,12 @@ const TEST_CASES = [
{
type: "localhost",
testURL: "http://127.0.0.1",
img_url: `url("chrome://global/skin/icons/document.svg")`,
img_url: `url("chrome://global/skin/icons/identity-icon.svg")`,
},
{
type: "localhost + http frame",
testURL: kBaseURILocalhost + "file_csp_block_all_mixedcontent.html",
img_url: `url("chrome://global/skin/icons/document.svg")`,
img_url: `url("chrome://global/skin/icons/identity-icon.svg")`,
},
{
type: "data URI",
@ -86,7 +81,7 @@ const TEST_CASES = [
type: "view-source HTTPS",
testURL: "view-source:https://example.com/",
// TODO this will get a secure treatment with bug 1496844.
img_url: `url("chrome://global/skin/icons/document.svg")`,
img_url: `url("chrome://global/skin/icons/identity-icon.svg")`,
},
];

View File

@ -124,10 +124,6 @@
list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
}
#identity-box[pageproxystate="valid"].localResource > #identity-icon {
list-style-image: url(chrome://global/skin/icons/document.svg);
}
#urlbar:not(.searchButton) > #urlbar-input-container > #identity-box[pageproxystate="invalid"] > #identity-icon {
list-style-image: url(chrome://browser/skin/search-glass.svg);
fill-opacity: .4;

View File

@ -1,6 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M14.12 3.71l-2.83-2.83A3 3 0 0 0 9.17 0H4a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5.83a3 3 0 0 0-0.88-2.12zM12.59 5H10V2.41zM12 14H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h5v3a1 1 0 0 0 1 1h3v7a1 1 0 0 1-1 1z"/>
</svg>

Before

Width:  |  Height:  |  Size: 557 B

View File

@ -38,7 +38,6 @@ toolkit.jar:
skin/classic/global/pictureinpicture/close-pip.svg (../../shared/pictureinpicture/close-pip.svg)
skin/classic/global/icons/columnpicker.svg (../../shared/icons/columnpicker.svg)
skin/classic/global/icons/delete.svg (../../shared/icons/delete.svg)
skin/classic/global/icons/document.svg (../../shared/icons/document.svg)
skin/classic/global/icons/error.svg (../../shared/icons/error.svg)
skin/classic/global/icons/find-previous-arrow.svg (../../shared/icons/find-previous-arrow.svg)
skin/classic/global/icons/find-next-arrow.svg (../../shared/icons/find-next-arrow.svg)