mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
7bbbd89f6e
--HG-- rename : accessible/tests/mochitest/name.css => accessible/tests/mochitest/name/general.css rename : accessible/tests/mochitest/name.xbl => accessible/tests/mochitest/name/general.xbl rename : accessible/tests/mochitest/name.js => accessible/tests/mochitest/name/markup.js rename : accessible/tests/mochitest/namerules.xml => accessible/tests/mochitest/name/markuprules.xml rename : accessible/tests/mochitest/name_nsRootAcc_wnd.xul => accessible/tests/mochitest/name/nsRootAcc_wnd.xul rename : accessible/tests/mochitest/test_name_button.html => accessible/tests/mochitest/name/test_button.html rename : accessible/tests/mochitest/test_name.html => accessible/tests/mochitest/name/test_general.html rename : accessible/tests/mochitest/test_name.xul => accessible/tests/mochitest/name/test_general.xul rename : accessible/tests/mochitest/test_name_link.html => accessible/tests/mochitest/name/test_link.html rename : accessible/tests/mochitest/test_name_markup.html => accessible/tests/mochitest/name/test_markup.html rename : accessible/tests/mochitest/test_name_nsRootAcc.xul => accessible/tests/mochitest/name/test_nsRootAcc.xul
20 lines
446 B
JavaScript
20 lines
446 B
JavaScript
/**
|
|
* Test accessible name for the given accessible identifier.
|
|
*/
|
|
function testName(aAccOrElmOrID, aName, aMsg)
|
|
{
|
|
var msg = aMsg ? aMsg : "";
|
|
|
|
var acc = getAccessible(aAccOrElmOrID);
|
|
if (!acc)
|
|
return;
|
|
|
|
var txtID = prettyName(aAccOrElmOrID);
|
|
try {
|
|
is(acc.name, aName, msg + "Wrong name of the accessible for " + txtID);
|
|
} catch (e) {
|
|
ok(false, msg + "Can't get name of the accessible for " + txtID);
|
|
}
|
|
return acc;
|
|
}
|