зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
034295e898
Коммит
1821e46092
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче