Bug 1334774 - re-introduce the hostname into ssl error messages, r=nhnt11

MozReview-Commit-ID: CexcCq5qo1v

--HG--
extra : rebase_source : afd9fd1178c8c72d31f8e17d66caa8bcaf8f3013
This commit is contained in:
Gijs Kruitbosch 2017-01-29 17:36:01 +01:00
Родитель 8b90765c37
Коммит 252f655de4
2 изменённых файлов: 9 добавлений и 1 удалений

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

@ -351,6 +351,9 @@
function initPageCertError() {
document.body.className = "certerror";
document.title = document.getElementById("certErrorPageTitle").textContent;
for (let host of document.querySelectorAll(".hostname")) {
host.textContent = document.location.hostname;
}
setupAdvancedButton(true);

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

@ -217,7 +217,7 @@ add_task(function* checkWrongSystemTimeWarning() {
});
add_task(function* checkAdvancedDetails() {
info("Loading a bad cert page and verifying the advanced details section");
info("Loading a bad cert page and verifying the main error and advanced details section");
let browser;
let certErrorLoaded;
yield BrowserTestUtils.openNewForegroundTab(gBrowser, () => {
@ -231,6 +231,11 @@ add_task(function* checkAdvancedDetails() {
let message = yield ContentTask.spawn(browser, null, function* () {
let doc = content.document;
let shortDescText = doc.getElementById("errorShortDescText");
info("Main error text: " + shortDescText.textContent);
ok(shortDescText.textContent.includes("expired.example.com"),
"Should list hostname in error message.");
let advancedButton = doc.getElementById("advancedButton");
advancedButton.click();
let el = doc.getElementById("errorCode");