Bug 805325 - Use the actual search engine name for logo's alt text on about:home, instead of the string "undefined". r=mak

This commit is contained in:
Daniel Holbert 2012-10-25 07:18:07 -07:00
Родитель 034295e898
Коммит 1821e46092
2 изменённых файлов: 23 добавлений и 1 удалений

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

@ -144,7 +144,7 @@ function setupSearchEngine()
if (searchEngineInfo.imageHD && window.matchMedia("(min-resolution: 2dppx)"))
logoElt.src = searchEngineInfo.imageHD;
#endif
logoElt.alt = searchEngineInfo.name;
logoElt.alt = searchEngineName;
}
// The "autofocus" attribute doesn't focus the form element

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

@ -67,6 +67,28 @@ let gTests = [
executeSoon(runNextTest);
}
},
{
desc: "Check that search engine logo has alt text",
setup: function ()
{
},
run: function ()
{
let doc = gBrowser.selectedTab.linkedBrowser.contentDocument;
let searchEngineLogoElt = doc.getElementById("searchEngineLogo");
ok(searchEngineLogoElt, "Found search engine logo");
let altText = searchEngineLogoElt.alt;
ok(typeof altText == "string" && altText.length > 0,
"Search engine logo's alt text is a nonempty string");
isnot(altText, "undefined",
"Search engine logo's alt text shouldn't be the string 'undefined'");
executeSoon(runNextTest);
}
},
];
function test()