зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216699 - Add Learn More link to Insecure Password Warning in Control Center. r=bgrins
--HG-- extra : commitid : KNjyMETahMC extra : rebase_source : f0498fe7a4a85731350172935252bb414b7503a8
This commit is contained in:
Родитель
f2f345b45d
Коммит
5924d46107
|
@ -6968,6 +6968,11 @@ var gIdentityHandler = {
|
|||
return this._identityPopupMixedContentLearnMore =
|
||||
document.getElementById("identity-popup-mcb-learn-more");
|
||||
},
|
||||
get _identityPopupInsecureLoginFormsLearnMore () {
|
||||
delete this._identityPopupInsecureLoginFormsLearnMore;
|
||||
return this._identityPopupInsecureLoginFormsLearnMore =
|
||||
document.getElementById("identity-popup-insecure-login-forms-learn-more");
|
||||
},
|
||||
get _identityIconLabel () {
|
||||
delete this._identityIconLabel;
|
||||
return this._identityIconLabel = document.getElementById("identity-icon-label");
|
||||
|
@ -7289,10 +7294,12 @@ var gIdentityHandler = {
|
|||
* applicable
|
||||
*/
|
||||
refreshIdentityPopup() {
|
||||
// Update the "Learn More" hrefs for Mixed Content Blocking.
|
||||
// Update "Learn More" for Mixed Content Blocking and Insecure Login Forms.
|
||||
let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
|
||||
let learnMoreHref = `${baseURL}mixed-content`;
|
||||
this._identityPopupMixedContentLearnMore.setAttribute("href", learnMoreHref);
|
||||
this._identityPopupMixedContentLearnMore
|
||||
.setAttribute("href", baseURL + "mixed-content");
|
||||
this._identityPopupInsecureLoginFormsLearnMore
|
||||
.setAttribute("href", baseURL + "insecure-password");
|
||||
|
||||
// Determine connection security information.
|
||||
let connection = "not-secure";
|
||||
|
|
|
@ -55,6 +55,9 @@ add_task(function* test_simple() {
|
|||
is(securityContentBG,
|
||||
"url(\"chrome://browser/skin/controlcenter/mcb-disabled.svg\")",
|
||||
"Using expected icon image in the Control Center subview");
|
||||
is(Array.filter(document.querySelectorAll("[observes=identity-popup-insecure-login-forms-learn-more]"),
|
||||
element => !is_hidden(element)).length, 1,
|
||||
"The 'Learn more' link should be visible once.");
|
||||
}
|
||||
|
||||
// Messages should be visible when the scheme is HTTP, and invisible when
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<broadcasterset>
|
||||
<broadcaster id="identity-popup-content-host" class="identity-popup-headline" crop="start"/>
|
||||
<broadcaster id="identity-popup-mcb-learn-more" class="text-link plain" value="&identity.learnMore;"/>
|
||||
<broadcaster id="identity-popup-insecure-login-forms-learn-more" class="text-link plain" value="&identity.learnMore;"/>
|
||||
</broadcasterset>
|
||||
|
||||
<panelmultiview id="identity-popup-multiView"
|
||||
|
@ -121,7 +122,7 @@
|
|||
and-when-loginforms="secure">&identity.description.insecure;</description>
|
||||
|
||||
<!-- Insecure login forms -->
|
||||
<description when-loginforms="insecure">&identity.description.insecureLoginForms;</description>
|
||||
<description when-loginforms="insecure">&identity.description.insecureLoginForms; <label observes="identity-popup-insecure-login-forms-learn-more"/></description>
|
||||
|
||||
<!-- Weak Cipher -->
|
||||
<description when-ciphers="weak">&identity.description.weakCipher;</description>
|
||||
|
|
Загрузка…
Ссылка в новой задаче