mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1721655 - stop using yellow 'caution' borders on network error pages, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D120686
This commit is contained in:
parent
072710086d
commit
6c30054cef
@ -1018,23 +1018,6 @@ function setCertErrorDetails(event) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Add slightly more alarming UI unless there are indicators that
|
||||
// show that the error is harmless or can not be skipped anyway.
|
||||
let cssClass = getCSSClass();
|
||||
// Don't alarm users when they can't continue to the website anyway...
|
||||
if (
|
||||
cssClass != "badStsCert" &&
|
||||
// Errors in iframes can't be skipped either...
|
||||
window.parent == window &&
|
||||
// Also don't bother if it's just the user's clock being off...
|
||||
!clockSkew &&
|
||||
// Symantec distrust is likely harmless as well.
|
||||
failedCertInfo.errorCodeString !=
|
||||
"MOZILLA_PKIX_ERROR_ADDITIONAL_POLICY_CONSTRAINT_FAILED"
|
||||
) {
|
||||
document.body.classList.add("caution");
|
||||
}
|
||||
}
|
||||
|
||||
// The optional argument is only here for testing purposes.
|
||||
|
@ -347,40 +347,6 @@ add_task(async function checkUnknownIssuerLearnMoreLink() {
|
||||
}
|
||||
});
|
||||
|
||||
add_task(async function checkCautionClass() {
|
||||
info("Checking that are potentially more dangerous get a 'caution' class");
|
||||
for (let useFrame of [false, true]) {
|
||||
let tab = await openErrorPage(UNKNOWN_ISSUER, useFrame);
|
||||
let browser = tab.linkedBrowser;
|
||||
|
||||
let bc = browser.browsingContext;
|
||||
if (useFrame) {
|
||||
bc = bc.children[0];
|
||||
}
|
||||
|
||||
await SpecialPowers.spawn(bc, [useFrame], async function(subFrame) {
|
||||
Assert.equal(
|
||||
content.document.body.classList.contains("caution"),
|
||||
!subFrame,
|
||||
`Cert error body has ${subFrame ? "no" : ""} caution class`
|
||||
);
|
||||
});
|
||||
|
||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
|
||||
tab = await openErrorPage(BAD_STS_CERT, useFrame);
|
||||
bc = tab.linkedBrowser.browsingContext;
|
||||
await SpecialPowers.spawn(bc, [], async function() {
|
||||
Assert.ok(
|
||||
!content.document.body.classList.contains("caution"),
|
||||
"Cert error body has no caution class"
|
||||
);
|
||||
});
|
||||
|
||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
}
|
||||
});
|
||||
|
||||
add_task(async function checkViewCertificate() {
|
||||
info("Loading a cert error and checking that the certificate can be shown.");
|
||||
for (let useFrame of [true, false]) {
|
||||
|
@ -9,12 +9,6 @@ body.certerror {
|
||||
justify-content: normal;
|
||||
}
|
||||
|
||||
body.caution {
|
||||
border-style: solid;
|
||||
border-color: #ffe900;
|
||||
border-width: 16px;
|
||||
}
|
||||
|
||||
body.captiveportal .title {
|
||||
background-image: url("wifi.svg");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user