Bug 1567784 - Part 3: Add tests to check the tooltip of the lock icon is correct if the page is insecure. r=johannh

Differential Revision: https://phabricator.services.mozilla.com/D41077

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tim Huang 2019-08-08 14:37:24 +00:00
Родитель 2b475b4af6
Коммит 3941b3910a
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -214,6 +214,11 @@ async function insecureTest(secureCheck) {
let newTab = await loadNewTab("http://example.com/" + DUMMY);
if (secureCheck) {
is(getIdentityMode(), "notSecure", "Identity should be not secure");
is(
document.getElementById("identity-icon").getAttribute("tooltiptext"),
gNavigatorBundle.getString("identity.notSecure.tooltip"),
"The insecure lock icon has a correct tooltip text."
);
} else {
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
}
@ -224,6 +229,11 @@ async function insecureTest(secureCheck) {
gBrowser.selectedTab = newTab;
if (secureCheck) {
is(getIdentityMode(), "notSecure", "Identity should be not secure");
is(
document.getElementById("identity-icon").getAttribute("tooltiptext"),
gNavigatorBundle.getString("identity.notSecure.tooltip"),
"The insecure lock icon has a correct tooltip text."
);
} else {
is(getIdentityMode(), "unknownIdentity", "Identity should be unknown");
}